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 |
|
Page Page 102 of PDF of 6th Edition (not in 5th Edition)
comment block below first code block on page 102 of PDF |
Code block is:
String quote = "Fourscore and " + "seven years ago,";
String more = quote + " our" + " fathers" + " brought...";
followed by comment block of:
// quote is now "Fourscore and seven years ago,"
// more is now " our fathers brought..."
Of course running the code in jshell and then examining the more variable produces
jshell> more
more ==> "Fourscore and seven years ago, our fathers brought..."
so the comment about more is incorrect.
So minor mistake that any programmer can see through without even going to jshell. But given this is a popular learners book seems right to ensure it is corrected for future editions - the error might temporarily confuse things for someone out there if new to programming as well as Java. It is an error not present in the 5th edition in ePub format as the code block is not accompanied by comments in that edition - so this is an error introduced in the 6th edition.
Note from the Author or Editor: Very belated thanks for catching this! You are correct and we've addressed the mistake in the upcoming edition.
|
Joshua Wilson |
Mar 20, 2024 |
|
|
Page Enter Generics
2nd Paragraph |
'If you look at the source or Javadoc for the List class,'
should be changed to:
'If you look at the source or Javadoc for the List interface,'
Similarly, in the code snippet below the paragraph:
public class List<E> {
should be changed to:
public interface List<E> {
Note from the Author or Editor: Suggested change is correct; I'll fix this in the 7e.
|
Tirumala Rao Bokka |
Apr 08, 2026 |
|
|
Page Enter Generics
8th Paragraph |
As before, ArrayList is a class that implements the List interface, but in this case, both List and ArrayList are generic classes.
should be changed to:
As before, ArrayList is a class that implements the List interface, but in this case, both List and ArrayList are generic types.
// calling them generic types is more appropriate than calling them generic classes
Note from the Author or Editor: Suggested fixes are correct; I'll include this fix in the 7e
|
Tirumala Rao Bokka |
Apr 08, 2026 |
|
|
Page Enter Generics
2nd code snippet from the end of the section (in reverse) |
public class Map<K, V> {
should be changed to:
public interface Map<K, V> {
Note from the Author or Editor: Good catch! And timely; we're starting work on the next edition and will be sure to fix this mistake.
|
Tirumala Rao Bokka |
Apr 08, 2026 |
|
|
Page Erasure section of Chapter 7
7th paragraph |
This time the compiler simply puts its foot down and says, “No.” You can’t test for a generic type in an instanceof operation.
// This is true in Java 11 and earlier. However, in Java 17 and later you can test for a generic type in an instanceof operation.
Note from the Author or Editor: Confirmed. I will update this section in the 7e.
|
Tirumala Rao Bokka |
Apr 09, 2026 |
|
|
Page 179
Code example at bottom of page |
Code example refers to a class called HelloJava3 which is in an earlier edition of the text but is no longer present in the 6th edition.
|
Jason Gero |
Dec 05, 2024 |
|