
Java MCQs - Control Statements
Control statements are the set of statements which can be controlled of execution flow on the behalf of conditions. Conditions like IF Condition, IF ELSE Condition, SWITCH Condition. One can run the set of statement or skip the set of statements where conditions are met. In this list of MCQs you will cover all possible mcqs for Control Statements.
1. An statement that checks the equality only ?
A. If
B. Switch
C. If and Switch
View Answer
2. "If statement" is used to test the condition.
A. true
B. false
View Answer
3. If condition is false then ?
A. Block of If condition will be executed
B. Block of If condition will not be executed
C. Block of Else will be executed (If exists)
D. Both B & A
View Answer
4. What is the correct output of this program ?
A. Compile time Error
B. Run time Error
C. If condition true
View Answer
5. What is the correct output of this program ?
A. If condition true
B. Else true
C. Both of above
View Answer
6. What is the correct output of this program ?
A. A greater than B
B. A less than B
C. Both of above
View Answer
7. What is the correct output of this program ?
A. A greater than B
B. A less than B
C. A greater than B OR A less than B
D. Invalid Condition
View Answer
8. What is the correct output of this program ?
A. A greater than B
B. A less than B
C. A greater than B OR A less than B
D. Valid Condition
View Answer
9. What is the correct output of this program ?
A. Compile time Error
B. A equals to B
C. A is not equals to B
View Answer
10. What is the correct output of this program ?
A. A less than B
B. A greater than B
C. Compile time error
View Answer