0
Plzz help which type of error is this???
4 ответов
+ 2
There is nothing wrong with the code.
Just import Set and HashSet.
import java.util.Set;
import java.util.HashSet;
+ 2
Izac Espinoza
For clarification, there actually is nothing wrong with using;
Set<Integer> values = new HashSet<Integer>();
and is usually the preferred way with collection types. It's a typical use of polymorphism. The only issue(s) I see from a glance at the code is the missing imports.