I saw this in java code.
"anObject?.property"
and
"anObject?.getProperty()"
.
I have tried look for it online. But could not find any. What does "?." mean here in Java?
I saw this in java code.
"anObject?.property"
and
"anObject?.getProperty()"
.
I have tried look for it online. But could not find any. What does "?." mean here in Java?
This does not exists is Java
You may find this in Kotlin
and this is called null safety
val a = "Kotlin"
val b: String? = null
println(b?.length)
println(a?.length)