Created
July 3, 2012 03:22
-
-
Save levinotik/3037353 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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