R11G R11G - 1 month ago 6
Java Question

The type Set is not generic; it cannot be parameterized with arguments <Integer>

I am facing this weird problem with my Eclipse.
Getting this error

The type Set is not generic; it cannot be parameterized with arguments <Integer>


I cleaned and build my project again.
Checked my Configure Build path and ensured that JRESystemLibrary is above MavenDependencies in Order and Export.

Googled as well but I can't find any issue with my code.
Why is the error popping up.

enter image description here

Answer

When you call Set it is being taken as your class Set, not java.util.Set.

Change the declaration to java.util.Set and it should be resolved.