Possible Duplicate:
Difference between >>> and >>
What does “>>>” in java mean?
What does >>
and >>>
mean in Java?
Why does -1 >> 2
and -1 >>> 2
have different results?
Possible Duplicate:
Difference between >>> and >>
What does “>>>” in java mean?
What does >>
and >>>
mean in Java?
Why does -1 >> 2
and -1 >>> 2
have different results?
>>
is a signed right shift operator which shifts a bit pattern to the right.
>>>
is an unsigned right shift operator which shifts a zero into the leftmost position. Please refer to the Oracle Docs.
In java, there are 2 types of right shifts. >>> will attach 0's to fill the empty spaces for both positive and negative numbers (logical shift right) while >> will attach 1's if negative and 0's if positive (sign extension).