Showing the sort example in a real project
authorJaroslav Tulach <jtulach@netbeans.org>
Wed, 26 Oct 2011 21:45:23 +0200
changeset 38340a073776e5b
parent 382 ac7bf2bf2f5d
child 384 8232b021005d
Showing the sort example in a real project
samples/individualsamples/src/org/apidesign/samples/SortNames.java
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/samples/individualsamples/src/org/apidesign/samples/SortNames.java	Wed Oct 26 21:45:23 2011 +0200
     1.3 @@ -0,0 +1,18 @@
     1.4 +package org.apidesign.samples;
     1.5 +
     1.6 +import java.util.ArrayList;
     1.7 +import java.util.Collections;
     1.8 +import java.util.List;
     1.9 +
    1.10 +public class SortNames {
    1.11 +    public static void main(String... args) {
    1.12 +        // BEGIN: petr.tom.sort
    1.13 +        List<String> arr = new ArrayList<String>();
    1.14 +        arr.add("Tom");
    1.15 +        arr.add("Petr");
    1.16 +        Collections.sort(arr);
    1.17 +        // END: petr.tom.sort
    1.18 +        
    1.19 +        System.err.println("Names: " + arr);
    1.20 +    }
    1.21 +}