Null safety Kotlin

PHOTO EMBED

Mon Apr 26 2021 21:12:21 GMT+0000 (UTC)

Saved by @GoodRequest.

data class Person(val name: String?, val age: Int)
val person = Person(null, 30)
person.name?.get(0)?.let(::println)
content_copyCOPY