Covers Oracle Certified Associate (OCA), Java SE 8 Programmer I Exam (1Z0-808)

Errata

Please check here often as we will update the errata regularly.

Errata updates:

Date of updatePrintingPages
2016-08-051st55
2016-08-201st54, 86, 97, 105, 127, 136, 146, 156, 161, 171, 172, 176, 181, 204, 300, 316, 317, 321, 342, 387, 526, 528, 536
2017-04-061st287, 292, 445

Acknowledgements:

Many thanks to the following readers for their diligent observations: Celine Vincent, Juliet de Wet.

Errata list:

The errors listed below are ordered according to their page numbers. Each error is labeled with all the printings where the error occurred. E.g. "1st printing" indicates that the error occurred in the first printing, but has been corrected before the second printing, i.e. you won't find this error in the second printing.

Page xxviii, Foreword:

The forword mentions Streams API. This topic is of course not on the Java SE 8 Programmer I exam, and therefore not covered in this book.

Page xxxiii, Preface:

Java SE Platform API Documentation, add the following at the bottom of the page.

The members have public accessibility unless otherwise stated.

Page 54

1st printing, end of the first paragraph of the subsection The Default Constructor:

INSERT:

..., where the accessibility is the same as the class.

Page 55

1st printing, middle of the page:

CHANGE:

        Light extraLight = new Light();   // (2) Call of explicit default constructor

TO:

        Light extraLight = new Light();   // (2) Call of explicit no-argument constructor

Page 86

1st printing, first sentence on the page:

CHANGE:

The three modifiers can occur in any order in the method header.

TO:

The two modifiers can occur in any order in the method header.

Page 97

1st printing, in the first sentence of the second paragraph:

The package name pandorasbox should be in code font.

Page 105

1st printing, the sentence immediately above Example 4.6:

CHANGE:

If the declaration of the method binarySearch() at (3) is allowed,
there is also no conflict, as this method declaration will shadow the imported method
whose signature it matches.

TO:

If the declaration of the method binarySearch() at (3) is uncommented,
there is also no conflict, as this method declaration will shadow the imported method
whose signature it matches.

Page 127

1st printing, Figure 4.7:

The box around packageB is missing.

Page 136

1st printing, bottom half of the page:

CHANGE:

The keyword abstract can be specified only in combination with the public or protected accessibility modifier.

TO:

Also a private method cannot be abstract, since a private method must provide an implementation.

Page 146

1st printing, first sentence:

CHANGE:

A boxing conversion converts the value of a primitive type to a corresponding value of its wrapper type.

TO:

A boxing conversion converts the value of a primitive type to a corresponding object of its wrapper type.

Page 156

1st printing, in the second table, first column, second row:

CHANGE:

Add two's complement,~N2:

TO:

Add two's complement,-N2:

1st printing, in the last table:

The ruling under the header row is missing.

Page 161

1st printing, top of the page, after the first bullet:

CHANGE:

A constant expression is an expression that denotes either a primitive or a String literal, and is ...

TO:

A constant expression is an expression that denotes either a primitive or a String literal, or is ...

Page 171

1st printing, last two sentences in the first paragraph:

CHANGE:

In the first two declaration statements that follow, only assignment conversions take place. Numeric promotions take place in the evaluation of the right-hand expression in the other declaration statements.

TO:

In the first two declaration statements that follow, only assignment conversions take place. In the third declaration statement, neither assignment conversion nor numeric promotion is necessary. Numeric promotions take place in the evaluation of the right-hand expression in the remaining declaration statements.

Page 172

1st printing, first sentence:

CHANGE:

Neither does the following approach, which results in a compile-time error:

TO:

Neither does the following approach, which also results in a compile-time error:

Page 176

1st printing, paragraph in the middle of the page:

CHANGE:

These operators cannot be applied to a variable that is declared final and that has been initialized, as the side effect would change the value in such a variable.

TO:

These operators cannot be applied to a variable that is declared final, as accessing a final variable returns a value and not a variable whose value can be changed.

Page 181

1st printing, first paragraph:

CHANGE:

Relational operators are nonassociative.
Mathematical expressions like a ≤ b ≤ c must be written using relational and
boolean logical/ conditional operators.

TO:

Relational operators in Java are nonassociative.
Pure mathematical expressions like a ≤ b ≤ c must be written using relational and
boolean logical/ conditional operators found in Java.

Page 204

1st printing, paragraph above Figure 6.2:

Figure 6.2 illustrates the flow of control through a switch statement where the default label is declared last.

TO:

Figure 6.2 illustrates the flow of control through a switch statement where the default label is declared last. This figure is simplified and does not take into consideration any explicit transfer of control out of the switch statement by a statement associated with any label.

Page 287

1st printing, in the last but one paragraph on the page:

CHANGE:

The super() call at (2) will result in a call to the no-argument constructor in B at (1),...

TO:

The super() call at (2) will result in a call to the no-argument constructor in A at (1),...

Page 292

1st printing, first line in Example 7.7:

CHANGE:

// File: RetailSeller.java

TO:

// File: StackUser.java

Page 300

1st printing, first paragraph of subsection Static Methods in Interfaces:

CHANGE:

As with static methods in a class, the keyword static is mandatory;
otherwise, the code will not compile.

TO:

The keyword static is mandatory; otherwise, the code will not compile.

Page 316

1st printing, at the end of last but one paragraph:

INSERT:

A compile-time error occurs if a call is ambiguous.

Page 317

1st printing, last code line in Example 7.14:

CHANGE:

System.out.println(client.testIfOn(light2)); // (5) ==> method at (2)

TO:

System.out.println(client.testIfOn(light2)); // (5) ==> method at (1)

Page 321

1st printing, first sentence of the second paragraph in the subsection The instanceof Operator:

CHANGE:

The instanceof operator returns true if the left-hand operand
(i.e., the reference value that results from the evaluation of reference expression) can be
a subtype of the right-hand operand (destination_type).

TO:

The instanceof operator returns true if the left-hand operand
(i.e., the reference value that results from the evaluation of reference expression) is
a subtype of the right-hand operand (destination_type).

Page 342

1st printing, second paragraph of the subsection The Object Class:

CHANGE:

The Object class provides the following general utility methods
(see Example 8.1 for usage of some of these methods):

TO:

The Object class provides the following general utility methods that have public
accessibility unless stated otherwise (see Example 8.1 for usage of some of these methods):

Page 387

1st printing, first sentence of second paragraph:

CHANGE:

To optimize its memory footprint, a live thread should retain access to an object as long for only as the object is needed for its execution.

TO:

To optimize its memory footprint, a live thread should retain access to an object as long as the object is needed for its execution.

Page 445

1st printing, code lines in the middle of the page:

CHANGE:

..

TO:

... (ellipses)

Page 526

1st printing, answer to Review Question 4.10:

CHANGE:

(e)

TO:

(d)

Page 528

1st printing, answer to Review Question 5.3, last sentence:

DELETE:

The local final String variable b is initialized only once in the code.

Page 536

1st printing, duplicate text in answer to Review Question 7.11:

DELETE:

Interface declarations do not provide any method implementations and permit only multiple interface inheritance. An interface can extend any number of interfaces and can be extended by any number of interfaces. Fields in interfaces are always static, and can be declared as static explicitly. Abstract method declarations in interfaces are always non-static, and cannot be declared static.

Khalid A. Mughal   •   Rolf W. Rasmussen