Java MCQ - English
Which one is a valid declaration of a boolean?
boolean b1 = 1;
boolean b2 = ‘false’;
boolean b3 = false;
boolean b4 = ‘true’
Answer : C
View More Related Question
1) Which of these is long data type literal?
2) In Java, the word true is ................
3) Java is a _______ language.
4) What will be the output for the below code ?
public class Test
{
public static void main(String[] args)
{
byte i = 128;
System.out.println(i);
}
}
5) Literals in java must be appended by which of these?