# Nested Loop

*noun*

say it: **“NEST-ed LOOP”** **/ˈnɛstɪd lup/**

A loop inside another loop, where the inner loop runs all the way through for each pass of the outer one.

## What is **Nested Loop** in Java?

**Nested Loop** — A loop placed inside another loop.

```java
class Theater {
    int[][] seats = {
        {1, 2},
        {3, 4}
    };
}
```

## In a sentence

- “I printed a multiplication table with a **nested loop**: one loop for the rows and one inside it for the columns.”

Level: Apprentice · [More Java terms at this level](https://www.ask-codey.com/glossary?category=java&level=2)

Updated: October 26, 2026

## In other subjects

- [Nested Loop in C#](https://www.ask-codey.com/glossary/nested-loop-c-sharp)
- [Nested Loop in JavaScript](https://www.ask-codey.com/glossary/nested-loop-javascript)
- [Nested Loop in Python](https://www.ask-codey.com/glossary/nested-loop)
- [Nested Loop in Software Development](https://www.ask-codey.com/glossary/nested-loop-software-development)

Source: https://www.ask-codey.com/glossary/nested-loop-java
