Welcome to the Core Java Bug List

How to Tell which Printing You Have

On the bottom of the copyright page (facing the first page of the table of contents), look for a line such as “First printing, December 2015”. In the errata below, we indicate the printing in which the error has been fixed inside square brackets such as [4].

For example, suppose you have the fourth printing. Then you can ignore all reports that are prefixed with [2], [3] or [4]. But you would want to pay attention to all reports that are prefixed with [5] or higher or that have no bracketed prefix at all.

10th Edition Volume 1 (Java SE 8)

Page 150
LocalDate hireDay = LocalDate.of(year, month, day);
hireDay = LocalDate.of(year, month, day);
Page 183
Change “For example, you can import all classes in the java.util package with the statement import java.util.*;” to “For example, you can import all classes in the java.time package with the statement import java.time.*;
Page 189
Change the section heading “Package Scope” to “Package Access”
Page 190
Change “package visibility” to “package access”
Page 230
Change Object.equals(hireDay, other.hireDay) to Objects.equals(hireDay, other.hireDay)
Page 243
return super.hashCode() + 17 * new Double(bonus).hashCode();
return java.util.Objects.hash(super.hashCode(), bonus);
Page 258
Remove the semicolon after public enum Size { SMALL, MEDIUM, LARGE, EXTRA_LARGE }
Page 292
Remove “for sorting an employee array”
Page 300
Change “Consider another interface with a getName method:” to “Consider two interfaces with a getName method:” and change the code below to:
interface Person
   default String getName() { return ""; };

interface Named
   default String getName() { return getClass().getName() + "_" + hashCode(); }
Page 323
Change “It is also illegal to refer to variable” to “It is also illegal to refer to a variable”.
Page 341
Remove the paragraph “As we already mentioned...always the same value” above the note.
Page 393
Change “At least up to Java SE 7” to “Up to Java SE 7”.
Page 428
public void setSecond(Object second) { setSecond((Date) second); }
public void setSecond(Object second) { setSecond((LocalDate) second); }
and change
public LocalDate getSecond() { return (Date) super.getSecond().clone(); }
public LocalDate getSecond() { return (LocalDate) super.getSecond().clone(); }
Page 432
for (t : ts) coll.add(t);
for (T t : ts) coll.add(t);
Page 489
Change System.println to System.out.println
Page 492
Change descripion to description in the toString method.
Page 497
Change int score = scores.get(id, 0); to int score = scores.getOrDefault(id, 0);
Page 510
Change List group2 to List<Employee> group2
Page 523
Change Collections.replaceAll("C++", "Java"); to Collections.replaceAll(words, "C++", "Java");
Page 550
Add a bullet before “You can maximize a frame by calling”
Page 576
Rectangle2D bounds = sansbold14..getStringBounds(message, context);
Rectangle2D bounds = sansbold14.getStringBounds(message, context);
Page 670
Page 680
Change “When the user selects a menu” to “When the user selects a menu item”.
Page 686
cutAction.putValue(Action.MNEMONIC_KEY, new Integer('A'));
aboutAction.putValue(Action.MNEMONIC_KEY, new Integer('A'));

10th Edition Volume 2 (Java SE 8) ???

(No bug reports yet)

Thanks to Yasir Bajwa, Henry Ying and (your name might go here) for their bug reports!

Bug Report Form

If you have found another bug in the book or in our code that is not mentioned in this bug list or the Core Java FAQ , then please send a report. Unfortunately, I cannot reply personally to each report, but I do read all your comments.

Your name:

Your email address:

Page number:

Problem description:

To protect against spam robots, please answer this simple math problem:
* =

Back to the Core Java page.