adplus-dvertising
frame-decoration

Question

What is the range of short data type in Java?

a.

-128 to 127

b.

-32768 to 32767

c.

-2147483648 to 2147483647

d.

None of the mentioned

Posted under Java Programming

Answer: (b).-32768 to 32767

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the range of short data type in Java?

Similar Questions

Discover Related MCQs

Q. What is the range of byte data type in Java?

Q. An expression involving byte, int, and literal numbers is promoted to which of these?

Q. Which of these literals can be contained in float data type variable?

Q. Which data type value is returned by all transcendental math functions?

Q. How to format date from one form to another?

Q. How to convert Date object to String?

Q. How to convert a String to a Date object?

Q. Is SimpleDateFormat thread safe?

Q. How to identify if a timezone is eligible for DayLight Saving?

Q. What is the replacement of joda time library in java 8?

Q. How is Date stored in database?

Q. What does LocalTime represent?

Q. How to get difference between two dates?

Q. How to get UTC time?

Q. Which of these is an incorrect string literal?

Q. Which two cause a compiler error?

1. float[ ] f = new float(3);
2. float f2[ ] = new float[ ];
3. float[ ]f1 = new float[3];
4. float f3[ ] = new float[3];
5. float f5[ ] = {1.0f, 2.0f, 2.0f};

Q. Given a method in a protected class, what access modifier do you use to restrict access to that method to only the other members of the same class?

Q. Which is a valid declaration within an interface?

Q. You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?

Q. Which three form part of correct array declarations?

1. public int a [ ]
2. static int [ ] a
3. public [ ] int a
4. private int a [3]
5. private int [3] a [ ]
6. public final int [ ] a