Error Compiling Example from Documentation

Felix Schmidt schmidtfx at
Tue Dec 7 04:16:47 PST 2010


I tried to compile this example from the documentation:

|class Person {
     private final String name;
     private final int age;

     public static int compareByAge(Person a, Person b) { return }

     public static int compareByName(Person a, Person b) { return a - b; }

Person[] people = ... // replaced by something
Arrays.sort(people, #Person.compareByAge);

The javac (lambda included) compiler reports me: lambda/[46,29] '{' expected

Is this feature not yet implemented? How could I get this compiled?

- Felix


More information about the lambda-dev mailing list