samples/individualsamples/src/org/apidesign/samples/SortNames.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 30 Oct 2014 20:46:27 +0100
changeset 408 9a439a79c6d0
parent 383 40a073776e5b
permissions -rw-r--r--
Use scala 2.10.4 to compile on JDK8
jtulach@383
     1
package org.apidesign.samples;
jtulach@383
     2
jtulach@383
     3
import java.util.ArrayList;
jtulach@383
     4
import java.util.Collections;
jtulach@383
     5
import java.util.List;
jtulach@383
     6
jtulach@383
     7
public class SortNames {
jtulach@383
     8
    public static void main(String... args) {
jtulach@383
     9
        // BEGIN: petr.tom.sort
jtulach@401
    10
        List<String> names = new ArrayList<String>();
jtulach@401
    11
        names.add("Tom");
jtulach@401
    12
        names.add("Petr");
jtulach@401
    13
        Collections.sort(names);
jtulach@383
    14
        // END: petr.tom.sort
jtulach@383
    15
        
jtulach@401
    16
        System.err.println("Names: " + names);
jtulach@383
    17
    }
jtulach@383
    18
}