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.

11th Edition Volume 1 (Java SE 9 - 11)

Page 54
Change “Except, of course, when n is negative.” to “Except, of course, when n is odd and negative.”
Page 69
Change the method names empty and blank to isEmpty and isBlank.
Page 69
In the API note for the startsWith/endsWith methods, change “returns true if the string starts or ends with suffix.” to “returns true if the string starts with prefix or ends with suffix.”
Page 628 preferences/ImageViewer.java
Change line 60 from
node.put("image", image);      
if (image != null) node.put("image", image);

11th Edition Volume 2 (Java SE 9 - 11)

Page 2, 4, 8, 23, 27, 45, 147
Change new String(Files.readAllBytes to Files.readString and remove the subsequent , StandardCharsets.UTF_8)
Page 65
For greater clarity, change the code block
var din = new DataInputStream(
   pbin = new PushbackInputStream(
      new BufferedInputStream(
         new FileInputStream("employee.dat"))));
var pbin = new PushbackInputStream(
   new BufferedInputStream(
      new FileInputStream("employee.dat")));
var din = new DataInputStream(pbin);
Page 71
var content = new String(Files.readAllBytes(path), charset);
var content = Files.readString(path, charset);
Page 112
Change “If you want to read the file as a string, call readAllBytes followed by” to “As already mentioned in Section 2.1.6, you can read the content of a text file as”. Replace the code line that follows with
var content = Files.readString(path, charset)
Two times, change
Files.write(path, content.getBytes(charset)
Files.writeString(path, charset
and, for consistency, change
Files.write(path, lines);
Files.write(path, lines, charset);
Page 113
In the API note, add bullets below the first and third bullet respectively.
Page 146
Change String match = input.group(); to String match = matcher.group();
Page 407

The default configuration file is located at


(or at jre/lib/logging.properties prior to Java 9).


The default configuration file is located at jdk/conf/logging.properties (or at jre/lib/logging.properties prior to Java 9).

JavaFX Bonus Chapter Page 47
In Figure 13.15, switch Label and Labeled
JavaFX Bonus Chapter Page 94
task.setOnFailed(event -> status.setText("Failed due to ") + task.getException());
task.setOnFailed(event -> status.setText("Failed due to " + task.getException()));

Thanks to Jessica Cunningham, Pavlo Gotsonoga, EricRybarczyk, Mark Summerfield, Andy Walsh, 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.