// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.ArrayList;
import java.util.Collections;

public class Lambda {
    public static void main(String[] args) {
        ArrayList<String> lst = new ArrayList<String>();
        lst.add("A");
        lst.add("BB");
        lst.add("CCC");
        Collections.sort(lst, (s1,s2)-> -s1.compareTo(s2));
        for(String s : lst) {
            System.out.println(s);
        }
    }
}
