(java@oneshot)logo/  logo/  logo/  logo/


 

Java Tutorial » Operators » Operators  
3.1.2.Operator PrecedencePrevious/Next

Operators with a higher precedence are executed before those of a lower precedence.

Operators on the same line have the same precedence:

Operator Precedence Group Associativity Operator Precedence
(), [], postfix ++, postfix -- left Highest
unary +, unary -, prefix ++, prefix --, ~, ! right
(type), new left
*, /, % left
+, - left
<<, >>, >>> left
< ,<= , >, >=, instanceof
==, !=
& left
^ left
| left
&& left
|| left
?: left
=, +=, -=, *=, /=, %=, <<=, >>=, >>>=, &=, |=, ^= right lowest


3.1.Operators
3.1.1. Six categories of operators
3.1.2. Operator Precedence
3.1.3. The op= Operators
3.1.4. The ternary operator (The Conditional Operator): result = value>conditionValue ? result1 : result2
3.1.5. Tests all the operators on all the primitive data types to show which ones are accepted by the Java compiler