What does bitshifting do in Java? In C++ is moves the bits left or right and fills the sides with 0s, in Java it seems to do something contrary to the docs that I can't figure out :(.
Basically my specific problem is that this just doesn't work and I can't figure out why:
Value should end up being 10 again, but instead it's -6 which as far as the docs on >>> are concerned just shouldn't be possible.Code:
byte value = (byte)(10 << 4);
value = (byte)(value >>> 4);