📜  对象 kotlin 代码示例

📅  最后修改于: 2022-03-11 14:53:34.135000             🧑  作者: Mango

代码示例1
val helloWorld = object {
    val hello = "Hello"
    val world = "World"
    // object expressions extend Any, so `override` is required on `toString()`
    override fun toString() = ""
}
print(helloWorld.hello+ " ")
print(helloWorld.world)