Multiple choice technology programming languages

A byte can be of what size

  1. -128 to 127

  2. (-2 power 8 )-1 to 2 power 8

  3. -255 to 256

  4. 8

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A signed byte in Java is 8 bits and ranges from -128 to 127. This is because one bit is used for the sign, leaving 7 bits for magnitude (2^7 = 128 possible values on each side of zero). Option B incorrectly describes the range, and Option C shows an incorrect calculation.