Wondering how to handle null in Kotlin?
Kotlin strictly differentiates between null and non-null types. This is great because it forces developers to consider when & where to use null. In this video, you’ll learn the basics of defining null variables, defining null parameters, and checking for null values.
- 0:08 How Kotlin handles null
- 0:30 Forces us to think about handling null
- 0:58 Define null variables
- 2:40 Define null function parameter
- 3:10 Checking for null
- 4:20 Elvis operator
- 5:40 Null-safe call
- 6:01 Non-null asserted call
Thoughts, questions, tips for handling null in Kotlin? Comment below or share on social media. I’d love to continue the conversation.