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.2 Generic methods — count greater than a threshold

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

Fill in countGreater so that it returns how many elements are strictly greater than threshold, using compareTo.

An element equal to the threshold is not counted. The program prints 2 and then 1.

Your solution