Computer Science, asked by Divankshi, 8 months ago

Example of loop program in java. ​

Answers

Answered by saurav6593
2

Answer:

Example:

public class NestedForExample {

public static void main(String[] args) {

//loop of i.

for(int i=1;i<=3;i++){

//loop of j.

for(int j=1;j<=3;j++){

System. out. println(i+" "+j);

}//end of i.

Answered by mankodiyakomal1234
1

Answer:

We use looping statements in Java to execute the same statement multiple times until it satisfies a certain condition. There are different types of looping statements in Java. In this tutorial, we will understand about Java for loop.There are different types of Java for loop as mentioned below. The working of for loop is the same for all the types and varies only in the syntax.

Similar questions