Skip to content

Instantly share code, notes, and snippets.

@andreyfomenkov
Last active February 15, 2018 12:54
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 andreyfomenkov/21b17561025f6b65cf7b820cef37390e to your computer and use it in GitHub Desktop.
Save andreyfomenkov/21b17561025f6b65cf7b820cef37390e to your computer and use it in GitHub Desktop.
User data class with .toString() method overriding
data class User(val firstName: String,
val lastName: String,
val age: Int) {
override fun toString() = "ABC-1234567890"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment