About Question enthuware.ocajp.i.v8.2.1193 :
Posted: Sun Jan 24, 2016 8:07 am
The explanation says:
But what about break with label?It is not possible to break out of an if statement. But if the if statement is placed within a switch statement or a loop construct, the usage of break in option 3 would be valid.
Code: Select all
public class Q33{
public static void main(String[] args){
label: if(true){
System.out.println("break label");
break label;
}
}
}