-
-
Save PatilShreyas/db2c4eff234024d52826e974b4c54fbd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val value by lazy { | |
println("Assigning a value") | |
10 | |
} | |
fun main() { | |
println(value) // prints "Assigning a value 10" | |
println(value) // prints "10" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment