我没有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"
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句