我没有我的Java参考书,用Google很难找到答案。
在Java中,“>>”和“>>>”运算符之间有什么区别?
int value = 0x0100;
int result = (value >> 8);
System.out.println("(value >> 8) = " + result); // Prints: "(value >> 8) = 1"
result = (value >>> 8);
System.out.println("(value >>> 8) = " + result); // Prints: "(value >>> 8) = 1"