Java operators
Operators in Java Programming Language :
- In Java Variables are Value Container used to store some value.
- In order to Perform some operation on the Data we use different operators such as arithmetic Operator,Logical Operator etc.
Operators are Classified as –
- Assignment Operator
- Arithmetic Operator
- Unary Operators
- Equality Operator
- Relational Operator
- Conditional Operators
- Bitwise and Bit Shift Operators
Operator and Its Precedence Table in Java
Operators | Precedence |
---|---|
postfix | expr++ expr-- |
unary | ++expr --expr +expr -expr ~ ! |
multiplicative | * / % |
additive | + - |
shift | << >> >>> |
relational | < > <= >= instanceof |
equality | == != |
bitwise AND | & |
bitwise exclusive OR | ^ |
bitwise inclusive OR | | |
logical AND | && |
logical OR | || |
ternary | ? : |
assignment | = += -= *= /= %= &= ^= |= <<= >>= >>>= |