Summary of experience of shift operator in Java
•
Java
There are three shift operators in Java
< <: shift left operator, Num < < 1, equivalent to num multiplied by 2
>>: shift right operator, Num > > 1, which is equivalent to num divided by 2
>>>: move unsigned right, ignore the sign bit, and fill up the empty bits with 0
Let's see how these shift operations are used
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码