Array_List_Set_TreeSet2
Code: Array_List_Set_TreeSet2.txt
  • TreeSet is a Set type collections with added functions.
     TreeSet<String> tset1 = new TreeSet<String>(list);
  • scale TreeSet to SET : Set<String> set2 = new TreeSet<String>(list);
     
 
Output::