Level | Symbol | Description | Associativity |

1 | ( ) | Function call, subexpression | Left To Right |

[ ] | Array subscript | ||

. | member selection | ||

2 | ! | Logical negation | Right To Left |

++ | Prefix Increment | ||

-- | Prefix Decrement | ||

~ | 1's Complement | ||

- | Unary negation | ||

+ | Unary Plus | ||

(type) |
Type cast | ||

3 | * | Multiplication | Left To Right |

/ | Division | ||

% | Modulus (Remainder | ||

4 | + | Addition | Left To Right |

- | Subtraction | ||

5 | << | Bitwise Left Shift | Left To Right |

>> | Bitwise Right Shift w/ Sign | ||

>> | Bitwise Right Shift w/ Zero | ||

6 | < | Less Than | Left To Right |

<= | Less Than or equal to | ||

> | Greater Than | ||

>= | Greater Than or equal to | ||

instanceof | Type comparison | ||

7 | == | Equality | Left To Right |

!= | Not Equal | ||

8 | & | Bitwise AND | Left To Right |

9 | ^ | Bitwise Exclusive OR(XOR) and Logical Exclusive OR | Left To Right |

10 | | | Bitwise Inclusive OR | Left To Right |

11 | && | Logical AND | Left To Right |

12 | || | Logical OR | Left To Right |

13 | ? : | Conditional Test (ternary conditional) | Right To Left |

14 | = | Assignment | Right To Left |

+= | Compound Add | ||

-= | Compound Subtract | ||

*= | Compound Multiply | ||

/= | Compound Divide | ||

%= | Compound Modulus | ||

<<= | Compound Bitwise Left Shift | ||

>>= | Compound Bitwise Right Shift (signed) | ||

>>>= | Compound Bitwise Right Shift (zeroed) | ||

&= | Compound Bitwise AND | ||

^= | Compound Bitwise Exclusive OR(XOR) | ||

|= | Compound Bitwise Inclusive OR | ||

15 | ++ | postfix Increment* | Left To Right |

-- | postfix Decrement* |

Last Updated on 08/02/00

By William N Ross