Task 6 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 — fill a list with a range

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

Fill in addRange so that it adds the whole numbers 1 through n to the given list, in order. It returns nothing.

Thanks to ? super Integer the same method fills a List<Number> or a List<Object>. The program prints [1, 2, 3] and then [].

Your solution