Home » JAVA Programming » Basic Datatypes » Question
  1. What is the range of short data type in Java?
    1. -128 to 127
    2. -32768 to 32767
    3. -2147483648 to 2147483647
    4. None of the mentioned.
    5. NA
Correct Option: B

Short occupies 16 bits in memory. Its range is from - 215 to 215 - 1
i.e. -32768 to 32767.



Your comments will be displayed only after manual approval.