For example see the foloowing small code:
class BreakIF
{
public static void main(
String[] args)
{
int i = 10;
FirstBreak:
if(i == 10){
int j = 2;
System.out.println("inside true part");
if(j == 2){
break FirstBreak;
}
while(j == 2){
System.out.println("inside while loop: " + j);
}
}else{
System.out.println("inside else statement");
}
}
}
While loop is an infinite loop, but while loop does not get executed because of early break of if condition. I think this will help you.