What is the ">>" and ">>>" operator in java? -
this question has answer here:
- double greater sign (>>) in java? 7 answers
hi wondering if me can find literally nothing online about. looking through code had following statement:
int mainint = 10>>> 5;
does know >> operator is?
for example 10 >> 1 equals 5 20 >>> equals 3
thanks
>>
arithmetic right-shift operator.
>>>
logical right-shift operator.
the first 1 preserves sign of operand. second inserts zeros @ significant bit positions, , applied on unsigned numbers.
Comments
Post a Comment