Java MCQ - English
What is the range of short data type in Java?
-128 to 127
-32768 to 32767
-2147483648 to 2147483647
None of the mentioned
Answer : B
View More Related Question
1) The following program:
public class Test{
static boolean isOK;
public static void main(String args[])
{
System.out.print(isOK);
}
}
Prints true
Prints false
Will not compile as boolean is not initialized
Will not compile as boolean can never be static
View Answer
2) What is the output of this program? class mainclass {
public static void main(String args[])
{
char a = 'A';
a++;
System.out.print((int)a);
}
}
3) Which of the following is not provided by BigDecimal?
4) Size of float and double in Java is
5) Which of the below data type doesn’t support overloaded methods for +,-,* and /?