Created
February 12, 2022 13:38
-
-
Save arsalankhan994/f686907b7202656041cf869558f95c15 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
main() { | |
/* | |
Data class example | |
*/ | |
val dataClass = StudentDataClass() | |
dataClass.copy() | |
dataClass.toString() | |
} | |
/* | |
Data class to store data, this class needs atleast one argument | |
*/ | |
data class StudentDataClass( | |
private val name: String | |
) { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment