변수의 늦은 초기화


lateinit

fun main() {
    lateinit var text: String

    val result1 = 30
    text = "Result : $result1"
    println(text)

    
    val result2 = 50
    text = "Result : ${result1 + result2}"
    println(text)
}

by lazy