Created
January 3, 2018 09:40
-
-
Save mahata/1c1347321d501f22e86cc6f6978cadf2 to your computer and use it in GitHub Desktop.
This file contains 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
val arrayList = arrayListOf(1, 5, 2) | |
Collections.sort(arrayList, object : Comparator<Int> { | |
override fun compare(o1: Int, o2: Int) = o2 - o1 | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment