Break Statement in Java

Break Statement is used to terminate the currect process from the program.
After the break Statement the control will goes to the statement immediately after the loop containing break statement.
Syntax: break;
';' - Semicolon Refers to terminate the statement.
public class BreakStatement{
 
  public static void main(String[] args) {

     
    int intArray[] = new int[]{1,2,3,4,5};
   
    System.out.println("Elements less than 3 are : ");
    for(int i=0; i < intArray.length ; i ++)
    {  
      if(intArray[i] == 3)
        break;
      else
        System.out.println(intArray[i]);
    }
   
  }
}