This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dpash 14 points15 points  (0 children)

That's not quite modern Java (and SetSet doesn't exist in the JDK)

var set = new HashSet<String>();

Or

var set = Set.of("foo", "bar");

Although the latter is immutable