Why does a 10000 byte not give maximum weight byte?
-
Why do you have to do it?
int c = 10000
typebyte
the variable becomes equal16
Not128
the maximum valuebyte
?int c = 10000; byte d = (byte) c; System.out.println(d);
-
You don't quite understand how the types are being introduced.
Attempt
int
tobyte
There is no " best approach " . There is a different way: " senior " baytes are simply thrown away.10000 = 0x2710 consists of two byte: 0x27 and 0x10. Senior White's dropping off, left junior 0x10 = 16.