Java OCA OCP Practice Question 993

Question

What is the range of values that can be assigned to a variable of type byte?

  • A. Depends on the underlying hardware
  • B. 0 through 2^8 - 1
  • C. 0 through 2^16 - 1
  • D. -2^7 through 2^7 - 1
  • E. -2^15 through 2^15 - 1


D.

Note

The range for an 8-bit byte is -2^7 through 2^7 -1.




PreviousNext

Related