Kotlin: understanding null safety
Example:
var name: String? = "John"
Kotlin aims to eliminate the danger of null references.
Solution:
print(name?.length)
Example: Solution:Kotlin: understanding null safety
Kotlin aims to eliminate the danger of null references.
var name: String? = "John"
print(name?.length)