Skip to content

Instantly share code, notes, and snippets.

@adam-arold
Last active September 11, 2017 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adam-arold/eeb7dd12e75d1f4013f76b4dd00529f4 to your computer and use it in GitHub Desktop.
Save adam-arold/eeb7dd12e75d1f4013f76b4dd00529f4 to your computer and use it in GitHub Desktop.
Kotlin user
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