0

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?

azro
  • 53,056
  • 7
  • 34
  • 70

1 Answers1

0

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)
azro
  • 53,056
  • 7
  • 34
  • 70