Java MCQ - English
Literal can be of which of these data types?
integer
float
boolean
all of the mentioned
Answer : D
View More Related Question
1) Which of these can not be used for a variable name in Java?
2) Which of these occupy first 0 to 127 in Unicode character set used for characters in Java?
3) Which of these values can a boolean variable contain?
4) What is the output for the below code ?
public class Test
{
public static void main(String[] args)
{
int i = 010;
int j = 07;
System.out.println(i);
System.out.println(j);
}
}
8 7
10 7
Compilation fails with an error at line 3
Compilation fails with an error at line 5
View Answer
5) In Java, the word true is ................