問題一覧へ for / while 基礎

for 文の更新式が動くタイミング

次のコードの実行結果として正しいものはどれですか。

public class Main {
  public static void main(String[] args) {
    int total = 0;
    for (int i = 1; i <= 3; i++) {
      total += i;
    }
    System.out.println(total);
  }
}

選択肢