Kotlin Basics - Lazy initialization
In Kotlin, an object can only be created when it is called, otherwise no object creation
The lazy () block
fun main() {
val bookInstance1 = Book(
"Rogue Lawyer", "John Grisham", 2015
) // prints Book Rogue Lawyer class is called
...
vigneshprabhu.dev1 min read