class Main {
public static void main(String[] args) {
int total = 0;
// init; condition; step
for (int i = 1; i < 5; i++) {
total += i;
}
System.out.println(total);
}
}the classic index-driven loop