Programming  Java  Statements

1. Which of the following is TRUE about the switch statement in Java?

A default send execution immediately to the end of the switch statement. A break send execution immediately to the end of the switch statement. A case send execution immediately to the end of the switch statement. The statements in a switch continue to execute as long as the condition at the top of the switch remains true.

2. Which of the following is a loop construct that will always be executed once?

switch for while do...while

3. Which one is not a valid jump statement?

return goto continue break

4. Which of the following is not a valid flow control statement?

break; continue outer; return; exit();

5. The break statement causes an exit

only from the innermost loop. only from the innermost switch. from innermost loops or switches. terminates a program.

 

*Click on the QNo to display a Question.

Total Ans

 

 

';
Aptitude Coaching - Free Live Session !!