What for >>> operator is used in java? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

What for >>> operator is used in java?

24th Jun 2016, 9:02 AM
Sarthak
2 Respostas
+ 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
25th Jun 2016, 5:04 PM
gandhiyash
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.
12th Jul 2016, 7:49 PM
Suki