0% found this document useful (0 votes)
52 views1 page

Tabel Operator Di Java Dengan Tingkatan Prioritas

1. The document describes the order of operations and associativity in Java. Operators with higher priority levels are evaluated before those with lower levels. 2. Operators at the same level are evaluated from left to right, except for level 11 which is evaluated right to left. 3. Associativity determines whether an expression with multiple operators of the same priority is evaluated left-to-right or right-to-left.

Uploaded by

Susi Melisa
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)
52 views1 page

Tabel Operator Di Java Dengan Tingkatan Prioritas

1. The document describes the order of operations and associativity in Java. Operators with higher priority levels are evaluated before those with lower levels. 2. Operators at the same level are evaluated from left to right, except for level 11 which is evaluated right to left. 3. Associativity determines whether an expression with multiple operators of the same priority is evaluated left-to-right or right-to-left.

Uploaded by

Susi Melisa
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/ 1

Prioritas 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
<< less than, less than or equal to
5 >> greater than, greater than or equal to left
>>> reference test
< <= 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 exclusive OR
9 left
^^ boolean (logical) OR
| bitwise OR
10 left
|| boolean (logical) OR
11 ?: conditional right
12 = assignment right
*= /= += -= %=
combinated assignment
13 <<= >>= >>>= right
(operation and assignment)
&= ^= |=

You might also like