阅读背景:

Thinking in java Shift operators 移位操作 还有基本运算符。

来源:互联网 

If you shift a char, byte, or short, it will be promoted to int before the shift takes place, and the result will be an int. Only the five low-order bits of the right-hand side will be used. This prevents you from shifting more than the number of bits in an int. If you’re operating on a long, you’ll get a long result. Only the six low-order bits of the right-hand side will be used, so you can’t shift more than the number of bits in a long.If you shift a char, byte, or short, it will be




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: