+ 2

# What for >>> operator is used in java?

2 Answers

+ 1

zero with right fill means it can shift the bits right and also considers the sign bit means convert the negative to positive and not change in positive value may be

0

This is a bitshift-operator. Your pc calculate with "0" an "1". With ">>>" you shift from left zeroes. An example: int i = -1 >>> 32 ; i= -1 cause an int can only have 32 Bits.
The first (leftest) Bit is the algebraic sign ( + or -) and with ">>" you shift that one. If there is an one at that left bit, its a negative number and the one will be shifted. Otherwise if its positive, the zero is be shifted. its the same like dividing by 2.
And the last one is ">>". With that you can shift "0" from right.
3 << 3 is the same as 3*2^3 and the same as 24.