If Statements

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

public class MyApplication{

public static void main(String[] args){

int amount = 0;

while (true){
System.out.println("In the loop");

if(amount == 6){
break;
}
amount++;
System.out.println("Out of the loop");

}
}
}

You might also like