initalise set with array code example
Example 1: java linkedhashset initialize
LinkedHashSet<Integer> lsh=new LinkedHashSet();
lsh.add(1);
Example 2: HashSet h = new HashSet();
HashSet<String> h = new HashSet<String>();
LinkedHashSet<Integer> lsh=new LinkedHashSet();
lsh.add(1);
HashSet<String> h = new HashSet<String>();