Skip to content
RED SAG Skills
easy5 pts · first answer countsandroidkotlinnull-safety

A chain of safe calls

What is the value and type of city when user.address is null?

data class Address(val city: String)
data class User(val address: Address?)

val city = user?.address?.city
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions