class BitShift { public static void main(String[ ] args) { int x = 0xFFFFFFFF; // Hexadecimal 0xFFFFFFFF is -1. int y = x; int z = x; x >>= 31; y >>>= 31; z = ~z; System.out.print(x + y + "" + x + y + z); } }