February 2018
Intermediate to advanced
350 pages
7h 35m
English
This is similar to the previous one, but it checks directly for the type:
if (nullableCupcake is Cupcake) { nullableCupcake.eat()}
It also works with when:
when (nullableCupcake) { is Cupcake -> nullableCupcake.eat()}
Both options, checking for null and non-null types, are a little bit verbose. Let's check other options.
Read now
Unlock full access