Java's unsigned, shift-right operator, >>>, always shifts zeros into the high-order bit.
Syntax
Its general form is shown here:
value >>> num
num specifies the number of positions to right-shift.
Example
The following code shows how to use unsigned right shift.
public class Main {
public static void main(String[] argv) {
int a = -2;
a = a >>> 32;
System.out.println("a is " + a);
}
}
public class MainClass {
public static void main(String args[]) {
int a = -1;
a = a >>> 24;
System.out.println(a);
}
}
output
255