pembanding java membandingkan
1. Collections.sort(people,Comparator.comparing(Person::getLastName));
2. Collections.sort(list,
Comparator.<Integer,Integer>comparing( i -> -grow[i])
.thenComparing( i -> -plant[i]));
3. Collections.sort(list,
Comparator.comparing( (Integer i) -> -grow[i])
.thenComparing( i -> -plant[i]));
4. Collections.sort(list,
Comparator.comparing( i -> -grow[(int)i])
.thenComparing( i -> -plant[(int)i]));
Outstanding Ocelot