In this lesson, you learned about the following topics:
The null value concept and its purposes
The differences between nullable and non-nullable types
null safety and null checks
null-related operators like safe call, Elvis operator, not-null assertion operator and
safe cast operator
Platform types and how to handle them in Kotlin.
The null value is a powerful thing. It allows you to express the absence of data. In Kotlin, you
have a variety of tools to handle the null values safely. As a last resort, you can use the
not-null assertion operator but you should use it with caution. It bypasses the null checks.
Be careful when using the Java APIs in your Kotlin projects. The Kotlin compiler does not enforce
any null checks on the Java platform types.
You reached the end of the lesson and the module. Congratulations! You’ve learned a lot about Kotlin language basics. In the next module, you’ll learn about the Kotlin objects. See you there!
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!
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.