intialise set java code example
Example 1: java create a set with values
Set<String> set = new HashSet<>(Arrays.asList("a", "b", "c"));
Example 2: java linkedhashset initialize
LinkedHashSet<Integer> lsh=new LinkedHashSet();
lsh.add(1);
Set<String> set = new HashSet<>(Arrays.asList("a", "b", "c"));
LinkedHashSet<Integer> lsh=new LinkedHashSet();
lsh.add(1);