举例代码:
输出:
the i is : 88
the l is : 67
从输出可以看出,两数没有变,因为移位前,Java首先把要移的位数和被移树的位数求余数,然后移动余数个位数,在本例中求余数为0,没有造成移动。
阅读(671) | 评论(0) | 转发(0) |
<script type=text/javascript charset=utf-8 src="http://static.bshare.cn/b/buttonLite.js#style=-1&uuid=&pophcol=3&lang=zh"></script> <script type=text/javascript charset=utf-8 src="http://static.bshare.cn/b/bshareC0.js"></script>
点击(此处)折叠或打开
- public class Console {
- public static void main(String[] args) {
- int i = 88 >> 32;
- long l = 67 >> 64;
- System.out.println("the i is : " + i);
- System.out.println("the l is : " + l);
- }
- }
the i is : 88
the l is : 67
从输出可以看出,两数没有变,因为移位前,Java首先把要移的位数和被移树的位数求余数,然后移动余数个位数,在本例中求余数为0,没有造成移动。
相关热门文章
- Linux 线程同步的三种方法 ...
- 促销蓝牙测试仪 MT8801C MT880...
- IT行业人才供不应求,投身IT行...
- http://yib.baoxainzp.com 宜...
- 简单方便的桌面虚拟化...
给主人留下些什么吧!~~
评论热议