Kotlin Tutorial #4: Null Safety — Kotlin's Best Feature
In the previous tutorial, you learned about variables and types. Now let’s learn about null safety — the feature that makes Kotlin truly special. Watch the Video: Prefer watching? Check out the video version of this tutorial on YouTube. NullPointerException (NPE) is the most common crash in Java and many other languages. Tony Hoare, who invented null references in 1965, called it his “billion-dollar mistake”. Kotlin solves this problem at compile time. ...