Task 2 of 7 · 0 solved · 7 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

9.3 Wildcards — sum any list of numbers

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

Fill in sumAll so that it returns the sum of the list as a double.

Thanks to ? extends Number the same method takes a List<Integer> and a List<Double> — without the wildcard it would accept neither. The program prints 6.0 and 4.0.

Your solution