Explain non-nested loop in Java with syntax
Answers
Answered by
2
The placing of one loop inside the body of another loop is called nesting. When you "nest" two loops, the outer loop takes control of the number of complete repetitions of the inner loop. While all types of loops may be nested, the most commonly nested loops are for loops.
Answered by
2
When a loop is used inside the another loop is called nested loop and if we not use a loop in another loop is called non-nested loop.
Syntax-for( initialisation; test condition;increment/decrement);
( statements);
Syntax-for( initialisation; test condition;increment/decrement);
( statements);
Similar questions