Skip to content

Instantly share code, notes, and snippets.

@iyengarajay
Created May 22, 2016 05:07
Embed
What would you like to do?
Collections.sort(teens,
Comparator.comparing(Teenager::getAge)
.thenComparing(Teenager::getPhoneBrand,Comparator.nullsLast(Comparator.naturalOrder())));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment