Computer Applications
What is the output of the following Java code?
boolean flag = false;
if (flag) {
System.out.println("True");
} else {
System.out.println("False");
}
- True
- False
- No output
- Compilation error
Related Questions
Which of the following is not a type of token in Java?
1. Method 3. Literal 2. Identifier 4. Keyword - only 1
- 1 and 3
- only 2
- only 4
The statement given below is termed as:
public void Accept(int a)- Method signature
- Method block
- Method prototype
- Constructor
Identify the static method from the list given below:
- length()
- nextLine()
- substring(int)
- isLetter(char)
Which one of the following will be the output of the below statements?
String a[]={"Rohini", "Rajarshi", "Rajeev", "Rehan", "Rebecca"}; System.out.println(a[2].substring(2));- jeev
- Ra
- Raj
- je