Computer scienceProgramming languagesKotlinObject-oriented programmingObject-oriented programming features

Standard delegates

Correct output

Report a typo

What is the correct output of line 22 in this code:

val lazyValue: String by lazy {
    print("Computed! ")
    "I am Lazy!"
}

fun main() {
    println(lazyValue) // Line 1
    println(lazyValue) // Line 2
}
Select one option from the list

Create a free account to access the full topic