Errata

Learning Java

Errata for Learning Java, Sixth Edition

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.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
PDF, ePub 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.

Joshua Wilson  Mar 20, 2024