...

/

Quiz: Kotlin’s Type System

Quiz: Kotlin’s Type System

Test your understanding of the concepts discussed in this chapter.

We'll cover the following...
1

What is the inferred type of name in the following Kotlin code?

fun processPerson(person: Person?) {
    val name = person?.name ?: "unknown"
}
A)

Person

B)

String

C)

Person?

D)

String?

Question 1 of 50 attempted
...