I need help understanding this code.
I know that the highest number a byte can be is 127, but I don't see the connection:
(byte)128 = -128
(byte)255 = -1
(byte)256 = 0
Thank you for any responses
class E2 {
static byte a = (byte)127;
static byte b = (byte)128;
static byte c = (byte)255;
static byte d = (byte)256;
public static void main(
String args[]) {
System.out.print(a + " " + b + " " + c + " " + d);
}
}
/*
127 -128 -1 0
*/