我知道 >> (两倍大)正在转移,但是做什么 >>> 做到了吗?
System.out.println(16>>>2); // OK
System.out.println(8>>>2); // OK
System.out.println(8>>>2); // OK
System.out.println(8<<<2); // not OK
我知道 >> (两倍大)正在转移,但是做什么 >>> 做到了吗?
System.out.println(16>>>2); // OK
System.out.println(8>>>2); // OK
System.out.println(8>>>2); // OK
System.out.println(8<<<2); // not OK
>>> 右移零填充运算符。
左操作数值向右移动右操作数指定的位数,移位值用零填充。
>>> 是有效的运算符 <<< 在java中无效的运算符如果尝试使用它给它
令牌“<”上的语法错误,删除此令牌
>>> :右移零填充运算符。左操作数值向右移动右操作数指定的位数,移位值用零填充。
更多信息: