java can you initialize set without hashset code example
Example 1: populate set in builder
Set<String> h = new HashSet<>(Arrays.asList("a", "b"));
Example 2: how to initialize a set in java
Set<E> h = new HashSet<E>();
Set<String> h = new HashSet<>(Arrays.asList("a", "b"));
Set<E> h = new HashSet<E>();