Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Java Operator Precedence

  1. The Bitwise operators has relative low precedence. They have lower precedence than arithmatical operators. It is suggested that you use parentheses when you mix lower precendenc (bitwise opertors, ternary opertor, etc.) and high precendenc operators together.

  2. There is no unsigned left shift operator in Java. https://www.quora.com/Why-is-there-no-unsigned-left-shift-operator-in-Java

32
null
16
null
1073741824
null
-2147483648
null
10000000000000000000000000000000
null

The shift oprator is cyclical.

1
null

Unsigned Right Shift Operator (>>>)

0
null
11111111111111111111111111111100
null
15
null
11111111111111111111111111111111
null
-1
null
illegal start of type
 System.out.println(1 <<< 3)
                          ^  

illegal start of expression
 System.out.println(1 <<< 3)
                           ^^ 

')' expected
 System.out.println(1 <<< 3)
                            ^

';' expected

^

reached end of file while parsing
 }
  ^
1
null
2
null
-1
null
11111111111111111111111111111111
null