Quiz on Idioms and Anti-Patterns
Practice your learning outcomes and test your understanding of the material presented in this chapter by taking this quiz.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
What is the output of the following code?
fun main() {
val person = Person().apply {
name = "Sean Connery"
nickname = "Dr. Kotlin"
}
println(person.nickname)
}
class Person {
lateinit var name: String
lateinit var nickname: String
}
A.
Dr. Kotlin
B.
Sean Connery
C.
Person
D.
Nickname
1 / 5