Java provides a rich set of operators to manipulate variables. We can divide all the Java operators into the following groups −
Arithmetic operators are used in mathematical expressions in the same way that they are used in algebra.
Relational Operators Shows the relation among variable eg.>,<,==,<=,>= etc.
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.
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||= += -= *= /= %= &= ^= |= <<= >>= >>>=|
© 2018 BreakInerview