当我移位1 << 63时,为什么Java返回-2147483648?
预期的结果是9 223 372 036 854 775 808使用Wolfram Alpha和我的计算器进行测试.
9 223 372 036 854 775 808
我测试过:
System.out.print((long)(1 << (63)));
java bit-manipulation bit-shift
bit-manipulation ×1
bit-shift ×1
java ×1