229646 (1) [Avatar] Offline
#1
Hi smilie

On page 41 it's written:
Comparator<Apple> byWeight =
(Apple a1, Apple a2) -> a1.getWeight().compareTo(a2.getWeight());


and on page 42:
(Apple a1, Apple a2) -> a1.getWeight().compareTo(a2.getWeight())

The fifth lambda expression has two parameters of
type Apple and returns an int: the comparison of
the weight of the two Apples.


So what does it return exactly?