A loop that contains another loop is known as a ________ loop.

  • double
  • enclosing
  • inner
  • nested
In Java, a loop that contains another loop is called a "nested loop." Nested loops are used when you need to perform repetitive tasks within repetitive tasks. The inner loop is executed multiple times for each iteration of the outer loop. This nesting can be done with various loop types like for, while, or do-while.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *