The operators in Java are shown in order of precedence from highest to lowest. Operators at higher precedence are evaluated before those at lower precedence. Most operators associate either left-to-right or right-to-left.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC or read online on Scribd
0 ratings0% found this document useful (0 votes)
126 views2 pages
The Operators in Java
The operators in Java are shown in order of precedence from highest to lowest. Operators at higher precedence are evaluated before those at lower precedence. Most operators associate either left-to-right or right-to-left.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC or read online on Scribd
You are on page 1/ 2
The operators in Java, shown in order of precedence - from highest to lowest
Priority Operators Operation Associativity
[ ] array index 1 () method call left . member access ++ pre- or postfix increment -- pre- or postfix decrement + - unary plus, minus 2 ~ bitwise NOT right ! boolean (logical) NOT (type) type cast new object creation 3 * / % multiplication, division, remainder left + - addition, substraction 4 left + string concatenation << signed bit shift left 5 >> signed bit shift right left >>> unsigned bit shift right < <= less than, less than or equal to 6 > >= greater than, greater than or equal to left instanceof reference test == equal to 7 left != not equal to & bitwise AND 8 left & boolean (logical) AND ^ bitwise XOR 9 left ^ boolean (logical) XOR | bitwise OR 10 left | boolean (logical) OR 11 && boolean (logical) AND left 12 || boolean (logical) OR left 13 ? : conditional right = assignment *= /= += -= %=