相关疑难解决方法(0)

位移操作不会返回预期结果

当我移位1 << 63时,为什么Java返回-2147483648

预期的结果是9 223 372 036 854 775 808使用Wolfram Alpha和我的计算器进行测试.

我测试过:

System.out.print((long)(1 << (63)));
Run Code Online (Sandbox Code Playgroud)

java bit-manipulation bit-shift

6
推荐指数
2
解决办法
7370
查看次数

标签 统计

bit-manipulation ×1

bit-shift ×1

java ×1