Introduction to Looping with While Loop in Java



his video tutorial explains the concept of looping in java programming language along with one of the loops available called as while loop.

You are gonna learn what are loops, why we have to use loops, what is the advantage of loops, what is a while loop, what is the syntax of while loop. how to use it in detail with example.


Source code for this video tutorial


package learningJava;

public class Chicken {
 public static void main(String[] args) {
  
  int counter = 1;
  
  while( counter <= 10  ){
   System.out.print(counter+" ");
   System.out.println("Learning Lad Rocks");
   counter++;
   
  }
  
 }

}



Back To Top