Slide 5
Slide 5 text
Example
JAVA7
sort(..., new
Comparator{
int compare(Type a, Type b) {
Return a.getValue() -
b.getValue();
}
});
JAVA8
sort(..., (Type a, Type b) -> {
return a.getValue() -
b.getValue();
});
OR
sort(..., (a, b) -> (a.getValue() -
b.getValue)) // !!! Smart