Fill in sumAll so that it returns the sum of the list as a double.
sumAll
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.
? extends Number
List<Integer>
List<Double>
6.0
4.0