What is the legal range of a byte integral type?
-
0 - 65, 535
-
(-128) - 127
-
(-32,768) - 32,767
-
(-256) - 255
B
Correct answer
Explanation
The byte type in Java is a signed 8-bit integer, which can represent values from -128 to 127. This range is calculated as -2^7 to 2^7-1. Option A shows the range for unsigned 16-bit (char), Option C is for short (16-bit signed), and Option D is incorrect. Option B is correct.