Head First Kotlin

Errata for Head First Kotlin

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
PDF
Page 17
bottom code example, 1st comment

Original: while (x > 3) { //The loop code will run as x is greater than 4 Problem: Condition tests if x is greater than 3, not 4 as mentioned in comment. Suggested fix: Change comment to: //The loop code will run as x is greater than 3

Jørgen Lang  Feb 25, 2019 
PDF
Page 52 and 55
Code A and B

The code for A and B each feature a line that includes a semicolon. These semicolons are redundant, and should be removed. The line: var x = 0; should be: var x = 0 and the line: var firemanNo = 0; should be: var firemanNo = 0

Dawn Griffiths
Dawn Griffiths
 
Mar 05, 2019 
PDF
Page 65
3rd heading

Original: "You can pass variables to a function so long as the variable type matches the parameter type" Readers might get the impression that *only* variables can be passed to a function. This could be misleading. "argument" is a more general term that also includes "plain" values. Suggestion: Use "arguments/type of argument“ instead of "variable".

Note from the Author or Editor:
Change the third heading to: You can pass arguments to a function so long as the argument type matches the parameter type

Jørgen Lang  Feb 27, 2019 
PDF
Page 82
heading

Heading reads "More powerful boolean expressions (continued)", but there is no previous heading of that name. Suggested fix: Remove "(continued)"

Note from the Author or Editor:
We don't need the main heading on this page, as it's really a continuation of the previous page. The entire heading "More powerful boolean expressions (continued)" can be removed.

Jørgen Lang  Feb 18, 2019 
PDF
Page 109
second last code annotation

Original: "Creates a Duck variable, and assigns it a reference to a Duck object." Should be "Creates a myDuck variable, and assigns it a reference to a Duck object." to match the code example on the left. Suggested fix: change "Duck variable" to "myDuck variable"

Note from the Author or Editor:
For extra clarification, the last but one annotation on page 109 can be changed to: Creates a Duck variable named myDuck, and assigns it a reference to a Duck object.

Jørgen Lang  Feb 20, 2019 
PDF
Page 126
4th paragraph 1st sentence

Original: "Each animal subclass inherits […] from the Animal subclass." Suggested fix: "Each animal subclass inherits […] Animal **super** class."

Note from the Author or Editor:
The first sentence under the "...and different function implementations" heading should be: Each animal subclass inherits functions named makeNoise, eat, roam and sleep from the Animal superclass.

Jørgen Lang  Feb 22, 2019 
PDF
Page 159
3rd para, 1st sentence

Original: "When we created the Animal class, we decided to instantiate the image, food and habitat properties …" Suggested fix: "When we created the Animal class, we decided to *initialize* the image, food and habitat properties "

Jørgen Lang  Mar 06, 2019