Understanding kotlin's null safety

One of Kotlin's most notable features is its built-in null safety. Kotlin aims to eliminate the danger of null references from code. Here's how null safety works:


  var name: String? = null
  println(name?.length)
  

Beginner's Guide to Kotlin