myanmarlinks
6/13/2019 - 4:20 AM

Kotlin Classes and Objects

Kotlin Classes and Objects

fun main(args: Array<String>) {
    println(Single.name)
    println(Single.nameChange)
    Single.nameChange = "How are you?"
    println(Single.nameChange)
}

object Single {
    val name: String = "Hello Kotlin"
    var nameChange: String = "Hello from Myanmar Links"
}