Ορισμός τύπων συναρτήσεων


@FunctionalInterface
interface TripletChooser <T> {
    T choose(T a, T b, T c);
}

class TripletChooserExample {
    public static void main(String args[]) {
        TripletChooser<String> getFirst = (a, b, c) -> a;
        System.out.println(getFirst.choose(args[0], args[1], args[2]));
    }
}