Last active
February 15, 2018 12:54
-
-
Save andreyfomenkov/21b17561025f6b65cf7b820cef37390e to your computer and use it in GitHub Desktop.
User data class with .toString() method overriding
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
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