実効WPM0
WPM0
正確率100%
経過時間0s
時間—
文字数0
不正解0
ミス0
進捗0%

Shift + Enter · 開始 / やり直し

コードのお手本のガイドを読む
プログラミング言語
Java
難易度
中級

Traverse a list and calculate its total.

import java.util.List;

public class Main {
    public static void main(String[] args) {
        List<Integer> values = List.of(4, 8, 15, 16);
        int total = 0;

        for (int value : values) {
            total += value;
        }

        System.out.println(total);
    }
}