Add a single line of code so that the function returns true if property b has a value.
Computer scienceProgramming languagesKotlinObject-oriented programmingSpecial constructions / Special classes
Lazy initialization
Initialized?
Report a typo
Write a program in Kotlin
class B {
lateinit var b: String
fun checkB() : Boolean {
// ... //
}
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.