Before looking at the Java source code, see a statement, the integer unsigned right to move a negative (such as 1024>>-22), then exclaimed: "There is this operation, the teacher did not teach Ah", the teacher did not teach.
On the internet, it was found that, for the int type, the shift operation focused only on the back 5 digits (bit) after the shift parameter was converted to binary, while long only focused on the latter 6 digits.
Give me a chestnut:
SYSTEM.OUT.PRINTLN (1024 >>> = 1024 >>>)/True
System.out.println (1024 >>> 10 = 1 024 >>> -22);/True
Where 10 is converted to binary after 1010,42 is converted to binary is 10101,-22 after conversion to binary is 11111111111111111111111111101010, all is the last 5 bit is 01010, so the unsigned right shift after the equality.
Impression should be a lot of books did not explain to this knowledge point, when the university, the teacher did not mention this.