create hashset with values java code example
Example 1: java create a set with values
Set<String> set = new HashSet<>(Arrays.asList("a", "b", "c"));
Example 2: HashSet h = new HashSet();
HashSet<String> h = new HashSet<String>();
Set<String> set = new HashSet<>(Arrays.asList("a", "b", "c"));
HashSet<String> h = new HashSet<String>();