1//Java Program to demonstrate the use of break statement
2//inside the for loop.
3public class BreakExample {
4public static void main(String[] args) {
5 //using for loop
6 for(int i=1;i<=10;i++){
7 if(i==5){
8 //breaking the loop
9 break;
10 }
11 System.out.println(i);
12 }
13}
14}