Control Statements in Java - Multiple Choice Questions with Answers

(1) Which of the following is TRUE about the switch statement in Java?
[A] A default send execution immediately to the end of the switch statement.
[B] A break send execution immediately to the end of the switch statement.
[C] A case send execution immediately to the end of the switch statement.
[D] The statements in a switch continue to execute as long as the condition at the top of the switch remains true.

Comment

Answer: Option [B]
(2) Which of the following is a loop construct that will always be executed once?
[A] switch
[B] for
[C] while
[D] do...while

Comment

Answer: Option [D]

do...while loop is executed at least once.

DOWNLOAD CURRENT AFFAIRS PDF FROM APP

Article and Schedule Quiz Start Test!
(3) Which one is not a valid jump statement?
[A] return
[B] goto
[C] continue
[D] break

Comment

Answer: Option [B]
(4) Which of the following is not a valid flow control statement?
[A] break;
[B] continue outer;
[C] return;
[D] exit();

Comment

Answer: Option [D]

exit() is not a flow control statement in Java.

(5) The break statement causes an exit
[A] only from the innermost loop.
[B] only from the innermost switch.
[C] from innermost loops or switches.
[D] terminates a program.

Comment

Answer: Option [C]

The break statement causes an exit from innermost loop or a switch.

Take Mock Tests

Missiles Mock Test Start Test!
SSC MTS Mock Test Start Test
IBPS CLERK MOCK TEST Start Test
SSC MTS 2022 JULY 26 Shift 1 (ENGLISH) Start Test!
SSC GD Previous Year Paper 2021 Nov 17 Shift - I (Hindi) Start Test!
SSC CGL Tier - 1 PYP 2022 April 21 Shift- 1 (ENGLISH) Start Test!
MPSC PAPER I MOCK TEST 1 (ENGLISH) Start Test!
IB Security Assistant Mock test 1 (english) Start Test!
UP POLICE CONSTABLE MOCK TEST 1 Start Test!
DELHI POLICE CONSTABLE MOCK TEST 1 (HINDI) Start Test!

Chapters