Have you ever heard of the billion-dollar mistake in software programming? It refers to the null type, which is common to most programming languages. Yet, each language treats it differently. Well-designed programs can make good use of nulls as it could be the best way to represent a certain state.
But, if not handled properly, a null value could lead to undesirable outcomes. This isn’t a far-fetched scenario. It happens to many programmers and in many projects, but especially as you’re starting out. Recently, many programming languages have introduced mechanisms to help better address nulls. Kotlin has had this feature from the very beginning.
In this lesson, you’ll learn about:
The concept of null.
How to define variables as nullable.
How to work with nullable variables in code.
See forum comments
This content was released on May 22 2024. The official support period is 6-months
from this date.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
Previous: Learn the Kotlin Language: Discover Operators
Next: Instruction 1
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.