Head First Kotlin by Dawn Griffiths

Head First Kotlin by Dawn Griffiths

Author:Dawn Griffiths
Language: eng
Format: epub, azw3
Publisher: O'Reilly Media
Published: 2018-05-08T16:00:00+00:00


myWolf?.w?.hunger = 2

It’s like saying “if myWolf is not null, and myWolf’s w property value is not null, then assign a value of 2 to w’s hunger property”:

Now that you know how to make safe calls to nullable types, have a go at the following exercise.

BE the Compiler

Each of the Kotlin files on this page represents a complete source file. Your job is to play like you’re the compiler, and determine whether each of these files will compile and produce the output on the right. If not, why not?



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.