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

java

Solution

`>>>` right shifts and fills with 0 at the left end, while `>>` fills with the sign bit.

This makes a difference for the signed integral types (i.e. all but `byte`), where a negative value has a set sign bit.

Problem

What is the difference between the operator >> and >>>?

Original source

Related problems