Back To Java Loops Index
//program to demonstrate break statement in while loop public class whilebreak { public static void main(String[] args) { int i=0; while(i<10) { if(i==5) { break; } System.out.println(i); i++; } } }