Home
MCQs
Java MCQs
Control Statements
Java MCQs

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.

11. What is the correct output of this program ?

A. A less than B

B. A greater than B

C. Compile time error

Answer: A

12. What is the correct output of this program ?

A. A less than B

B. A greater than B

C. Compile time error

Answer: B

13. What is the correct output of this program ?

A. A greater than B

B. A less equals to B

C. None of above

Answer: B

14. What is the correct output of this program ?

A. A greater than B

B. A less equals to B

C. Else condition

Answer: C

15. What is the correct output of this program ?

A. A1

B. A2

C. A3

D. Default

Answer: B

16. What is the correct output of this program ?

A. A2 A2 A3 Default

B. A2

C. A2 A3 Default

D. Default

Answer: C

17. What is the correct output of this program ?

A. A2

B. Compile time error

C. A2 A3 Default

D. Default

Answer: B

18. What is the correct output of this program ?

A. Basic Subjects

B. Java Subjects

C. Microsoft Subjects

D. Default

Answer: B