Main.java:13: error: incompatible types: cannot infer type arguments for HashSet<>
public LinkedHashSet<Long> set = new HashSet<>();
^
reason: no instance(s) of type variable(s) E exist so that HashSet<E> conforms to LinkedHashSet<Long>
where E is a type-variable:
E extends Object declared in class HashSet
Main.java:16: error: cannot find symbol
return set.get(index);
^
symbol: method get(long)
location: variable set of type LinkedHashSet<Long>
Main.java:20: error: cannot find symbol
set.put(value);
^
symbol: method put(int)
location: variable set of type LinkedHashSet<Long>
3 errors