What is the difference between >> and >>> operators in Java?

Java 8Object Oriented ProgrammingProgramming

>> Binary Right Shift

The left operand value is moved right by the number of bits specified by the right operand.

>>> Shift right zero fill

The left operand value is moved right by the number of bits specified by the right operand and shifted values are filled up with zeros.

raja
Updated on 30-Jul-2019 22:30:21

Advertisements