Método Java List usando o Method Set ()
import java.util.*;
public class Main {
public static void main(String[] args) {
List<String> list= new ArrayList<>();
list.add("Apple");
list.add("Mango");
list.add("Banana");
System.out.println("List : "+list);
//will sort the string acc to the alphabets
Collections.sort(list);
System.out.println("Sorted List : "+list);
}
}
Outrageous Ostrich