Last active
September 11, 2017 16:27
-
-
Save adam-arold/eeb7dd12e75d1f4013f76b4dd00529f4 to your computer and use it in GitHub Desktop.
Kotlin user
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
class KotlinUser(val name: String, val age: Int) { | |
fun toHumanReadableFormat() = "JavaUser{name='$name', age=$age}" | |
fun toHumanReadableFormatWithMethodCall() = | |
"JavaUser{name='${name.capitalize()}', age=$age}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment