# for Loop

A loop that keeps its setup, condition, and update together.

## 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;
        }
    }
}
```

Level: Apprentice · [More Java terms at this level](https://www.ask-codey.com/glossary/subjects/java/apprentice)

Updated: September 27, 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)

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