会挽雕弓如满月,西北望,射天狼。 注册 | 登陆

Java学习日记:新运算符 >>>

为了达到与平台无关,Java增加了一种位运算符“>>>”,相对于C/C++的“>>”的右移是否带符号与机器平台有关,而Java是与平台无关,所以为了解决这个问题,引入“>>>”
The signed left shift operator "<<" shifts a bit pattern to the left,
and the signed right shift operator ">>" shifts a bit pattern to the right.
The bit pattern is given by the left-hand operand, and the number of
positions to shift by the right-hand operand. The unsigned right shift
operator ">>>" shifts a zero into the leftmost position, while the leftmost
position after ">>" depends on sign extension.

Tags: 编程, Java

« 上一篇 | 下一篇 »

只显示5条记录相关文章

Usereg Tunet for Android (浏览: 554, 评论: 0)
可能是jQuery1.3.2的一个小bug (浏览: 2664, 评论: 0)
扫雷对战版 (浏览: 13874, 评论: 1)
一个用Qt写的多线程聊天室软件 (浏览: 5767, 评论: 3)
C/C++利用CPU时钟计数器精确计时 (浏览: 4120, 评论: 0)

发表评论

评论内容 (必填):