COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A BREAK statement inside a Loop like WHILE, FOR, DO WHILE and Enhanced-FOR causes the program execution ____ Loop.
A
Continuation with next iteration
B
Never exit
C
Exit
D
None
Explanation: 

Detailed explanation-1: -Java Break Statement. When a break statement is encountered inside a loop, the loop is immediately terminated and the program control resumes at the next statement following the loop. The Java break statement is used to break loop or switch statement. It breaks the current flow of the program at specified condition.

Detailed explanation-2: -Explanation: Use the Labels only to choose outer loops. Otherwise, simply use BREAK or CONTINUE without any label.

There is 1 question to complete.