OPERATORS (In Precedence Order)
Parenthesis r used to change the precedence of these op…Smaller alphabets(a,b,c) has greater precedence than capital alphabets(A,B,C).
Parenthesis |
( ), [ ], ::(scope resolution), .(dot operator) |
Unary RàL |
!, ~(telda),+, -, ++(increment), –(decrement) |
Arithmetic/binary LàR |
*, /, %(modules), +, – |
Bitwise operator |
&(and), ^ (xor), ¦(pipe/or) |
Relational operator |
<, >, <=, >= , = =, != |
Bitwise operator |
<<(left shift ), >>(right shift) |
Logical operators |
&&, ||, ! |
Conditional / ternary |
? : (short hand for if else ) |
Assignment RàL |
=, *=, /=, %=, +=, -=, &=, !=, ^= |
Assignment =, comparison operator = =, exact comparison = = =.
there s no incr & decr op in java so, we can use i =i +1 instead. but in java 1.3 we can use ++ & –.
Java 2 means java 1.2 & java 3 means java 1.3.