friends, I am new to Java-Collection. I want to ask does Collections.sort() method only used for/by collections which are List type. I was unable t
Collections.sort()
List
No. There is by definition no way to sort a HashSet. You can use a TreeSetinstead tho'.
HashSet
TreeSet