# for Loop

*noun*

say it: **“FOR loop”** **/ˈfɔr lup/**

A loop that repeats code a set number of times, with its start, its stopping condition and its step all on one line.

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

**for Loop** — A loop that keeps its setup, condition, and update together.

```java
class Schedule {
    void markThreeDays(boolean[] scheduled) {
        for (int day = 0; day < 3; day++) {
            scheduled[day] = true;
        }
    }
}
```

## In a sentence

- “I used a **for loop** that counts from 1 to 10 to print the times table for 7.”

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

- [for Loop in C#](https://www.ask-codey.com/glossary/for-loop-c-sharp)
- [for Loop in JavaScript](https://www.ask-codey.com/glossary/for-loop-javascript)
- [for Loop in PowerShell](https://www.ask-codey.com/glossary/for-loop-powershell)
- [for Loop in Python](https://www.ask-codey.com/glossary/for-loop)
- [for Loop in Unix](https://www.ask-codey.com/glossary/for-loop-unix)

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