Java provides a rich set of operators to manipulate variables. We can divide all the Java operators into the following groups −
- Arithmetic Operators
- Relational Operators
- Bitwise Operators
- Logical Operators
- Assignment Operators
The Arithmetic Operators
Arithmetic operators are used in mathematical expressions in the same way that they are used in algebra.
The Relational Operators
Relational Operators Shows the relation among variable eg.>,<,==,<=,>= etc.
The Bitwise Operators
Java defines several bitwise operators, which can be applied to the integer types, long, int, short, char, and byte.
Bitwise operator works on bits and performs bit-by-bit operation.
The Logical Operators
Logical Operators check logic among variable.java provide types of logical operator eg. &&,||,! etc.
Following table shows types of Java Operator
|unary||++expr --expr +expr -expr ~ !|
|multiplicative||* / %|
|shift||<< >> >>>|
|relational||< > <= >= instanceof|
|bitwise exclusive OR||^|
|bitwise inclusive OR||||
|assignment||= += -= *= /= %= &= ^= |= <<= >>= >>>=|