Last active
January 13, 2022 07:09
-
-
Save PragmaticCoding/e7e3c38f85227842558e3ebc79f6c9ff to your computer and use it in GitHub Desktop.
Kotlin Property Implementation and Assignment
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 KotlinClass() { | |
public var nickName: String = "" | |
} | |
fun main(args: Array<String>) { | |
val testClass = KotlinClass() | |
testClass.nickName = "Shorty" | |
println("Nickname: $testclass.nickName") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment