Loop Statement

In programming languages, loops are used to execute a set of instructions/functions repeatedly when some conditions become true. There are three types of loops in java.

  • for loop
  • while loop
  • do-while loop

Sample Code

				
			
//for loop  rnfor(int i=1;i<=10;i++){  rnSystem.out.println(i);  rn}