Java’s byte
is a signed 8-bit numeric type whose range is -128
to 127
(JLS 4.2.1). 233
is outside of this range; the same bit pattern represents -23
instead.
11101001 = 1 + 8 + 32 + 64 + 128 = 233 (int)
1 + 8 + 32 + 64 - 128 = -23 (byte)