小编Ale*_*der的帖子

Bitshifting in Java

I'm trying to understand how bit shift works. Can someone please explain the meaning of this line:

while ((n&1)==0) n >>= 1;
Run Code Online (Sandbox Code Playgroud)

where n is an integer and give me an example of a n when the shift is executed.

java bit-manipulation shift

11
推荐指数
3
解决办法
1万
查看次数

标签 统计

bit-manipulation ×1

java ×1

shift ×1