ferrari
is nullable and we're calling its property directlyferrari
can't be set to null
That's right! Kotlin keeps us from running this code so that our program won't crash when ferrari
has no value.
Whoops! A nullable variable can be set to null
.