posted 9 years ago
Howdy All -
I am prepping for the 803 test and came across this one. Just trying to understand the concept of what is happening.
If a byte can only store values between -128 and 127 ... and you cast a larger int to a byte as below. Why does this print 44?
byte b = (byte) 300;
System.out.println(b);
Thanks.
- Jorma