Created
June 5, 2017 06:10
-
-
Save anonymous/ba398be974f1861256a5770eb33b009c 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
object KFoo { | |
private data class Person internal constructor(val age: Int, val name: String) | |
@JvmStatic fun main(args: Array<String>) { | |
val people = mutableListOf( | |
Person(20, "A"), | |
Person(18, "B"), | |
Person(22, "C") | |
) | |
people.sortBy { it.age } | |
println(people) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment