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.

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

Level: Apprentice · More Java terms at this level

Updated

In other subjects