+91-85006-22255
What is the supported range for short data type.
Correct Answer : C
short is 16-bit signed integer datatype. It is generally used to save memory in arrays. As short is 16 bit (2 bytes), it ranges from -2 power(16-1) to +(2 power(16-1)) - 1 i.e. -2^15 to +(2^15) - 1.
short
-2 power(16-1)
+(2 power(16-1)) - 1
-2^15
+(2^15) - 1
Topic: Integer Data Types In Java
Read this topic Take test on this topic
Open In App