Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class myClass {
- public static void main(String[] args){
- String[] crap = {"apples", "lemons", "geese", "bacon", "youtube"};
- List<String> l1 = Arrays.asList(crap);
- System.out.println(l1);
- Collections.sort(l1);
- System.out.println(l1);
- Collections.sort(l1, Collections.reverseOrder());
- System.out.println(l1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement