Skip to content

Instantly share code, notes, and snippets.

@rssh
Created September 15, 2014 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rssh/f766e6783af08403ae8a to your computer and use it in GitHub Desktop.
Save rssh/f766e6783af08403ae8a to your computer and use it in GitHub Desktop.
jdv_article_4 (simple lambda-expression in java)
list.sort((x,y)-> {
int cmp = x.lastName.compareTo(y.lastName);
return cmp!=0 ? cmp : x.firstName.compareTo(y.firstName)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment