Multiple Choice Question on Java Programming





Java Programming » Section-1

1 .
What is the range of data type short in Java?
A .
-128 to 127
B .
-32768 to 32767
C .
-2147483648 to 2147483647
D .
None of the mentioned
2 .
What is the range of data type byte in Java?
A .
-128 to 127
B .
-32768 to 32767
C .
-2147483648 to 2147483647
D .
None of the mentioned
3 .
An expression involving byte, int, and literal numbers is promoted to which of these?
A .
int
B .
long
C .
float
D .
byte
4 .
Which of these literals can be contained in a data type float variable?
A .
1.7e-308
B .
3.4e-038
C .
1.7e+308
D .
3.4e-050
5 .
Which data type value is returned by all transcendental math functions?
A .
int
B .
float
C .
double
D .
long