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


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

A. It depends on the underlying hardware.

B. 0 through 28-1

C. 0 through 216-1

D. -27 through 27-1

E. -215 through 215-1.

Answer:D is correct. The range of an 8-bit byte is -27 through 27-1.

 

 

 

 

 
 
 
 
 
COPYRIGHT © 2017 java-samples.com. ALL RIGHTS RESERVED.