byte x = -1; for(int i = 0; i < 8; i++) { x = (byte) (x >>> 1); System.out.println(\"X: \" + x); }
As I understand it, java sto
I'm not sure about this. But, my guess is that
x >>> 1
gets promoted to a int from byte, because the literal "1" is an int. Then what you are observing makes sense.