Skip to content

Instantly share code, notes, and snippets.

@levinotik
Created July 3, 2012 03:22
Show Gist options
  • Save levinotik/3037353 to your computer and use it in GitHub Desktop.
Save levinotik/3037353 to your computer and use it in GitHub Desktop.
//java
List list = new List(1, 2, 5, 3);
Comparator myComparator = new Comparator() {
public void compare(Object this, Object that) {
return this > that;
}
}
Collections.sort(list, myComparator);
//scala
list.sort { _ < _ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment