Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132930 views
License: OTHER
1
import java.util.Collections;
2
import java.util.LinkedList;
3
import java.util.List;
4
5
public class Main {
6
public static void main(String[] args) {
7
List<String> myList = new LinkedList<String>();
8
myList.add("I");
9
myList.add("think");
10
myList.add("therefore");
11
myList.add("I");
12
myList.add("am");
13
14
System.out.println(myList);
15
Collections.sort(myList);
16
System.out.println(myList);
17
}
18
}
19
20