0% found this document useful (0 votes)
28 views2 pages

Java Operator Precedence Table

The document provides a Java operator precedence table, detailing various operators, their descriptions, and their associativity. It includes operators for method invocation, member access, arithmetic operations, comparison, logical operations, and assignment. Each operator is categorized with its precedence and direction of evaluation, either left-to-right or right-to-left.

Uploaded by

aaryathedanger
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views2 pages

Java Operator Precedence Table

The document provides a Java operator precedence table, detailing various operators, their descriptions, and their associativity. It includes operators for method invocation, member access, arithmetic operations, comparison, logical operations, and assignment. Each operator is categorized with its precedence and direction of evaluation, either left-to-right or right-to-left.

Uploaded by

aaryathedanger
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Java Operator Precedence Table

Operator Description Associativity


() method invocation left-to-right
[] array subscript
. member access/selection
++ unary postfix increment right-to-left
-- unary postfix decrement
++ unary prefix increment right-to-left
-- unary prefix decrement
+ unary plus
- unary minus
! unary logical negation
( type ) unary cast
new object creation
* multiplication left-to-right
/ division
% modulus (remainder)
+ addition or string concatenation left-to-right
- subtraction

< less than left-to-right


<= less than or equal to
> greater than
>= greater than or equal to
instanceof type comparison
== is equal to (equality) left-to-right
!= is not equal to (inequality)
&& logical/conditional AND (short-circuiting) left-to-right
|| logical/conditional OR (short-circuiting) left-to-right
?: conditional/ternary (if-then-else) right-to-left
= assignment right-to-left
+= addition assignment
-= subtraction assignment
*= multiplication assignment
/= division assignment
%= modulus/remainder assignment

You might also like