Medium
val aVar by lazy {
println("I'm calculating this value")
"Hello"
}
println(aVar)
println(aVar)
println(aVar)
println(aVar)
At runtime, what will be displayed in the console?
Author: W3D TeamStatus: PublishedQuestion passed 546 times
Edit
-1
Community EvaluationsNo one has reviewed this question yet, be the first!
3
Write a Kotlin program that evaluates an arithmetic expression.4
Kotlin: Compile the following code and see the error.5
Write a function that returns the maximum of two integers in Kotlin7
How to flatten a list of lists in Kotlin2
How to add a new element to a list of Kotlin data class2
Print the value of a nullable string in Kotlin2
Concatenate two strings in Kotlin