while(condition){
 //code to be executed}
    
 
 public class WhileExample {
     public static void main(String[] args) {
         int i=1;
         while(i<
         =10){
             System.out.println(i);
             i++;
         }
     }
 }
  12345678910
  while(true){
 //code to be executed}
  public class WhileExample2 {
     public static void main(String[] args) {
         while(true){
             System.out.println("infinitive while loop");
         }
     }
 }
  infinitive while loopinfinitive while loopinfinitive while loopinfinitive while loopinfinitive while loopctrl+c