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 .
For example, suppose you have the fourth printing. Then you can ignore all reports that are prefixed with ,  or . But you would want to pay attention to all reports that are prefixed with  or higher or that have no bracketed prefix at all.
nis negative.” to “Except, of course, when
nis odd and negative.”
endsWithmethods, change “returns true if the string starts or ends with
suffix.” to “returns true if the string starts with
prefixor ends with
if (image != null) node.put("image", image);
Files.readStringand remove the subsequent
var din = new DataInputStream( pbin = new PushbackInputStream( new BufferedInputStream( new FileInputStream("employee.dat"))));to
var pbin = new PushbackInputStream( new BufferedInputStream( new FileInputStream("employee.dat"))); var din = new DataInputStream(pbin);
var content = new String(Files.readAllBytes(path), charset);to
var content = Files.readString(path, charset);
readAllBytesfollowed 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.writeString(path, charsetand, for consistency, change
Files.write(path, lines, charset);
static String readString(Path path, Charset charset)
static Path write(Path path, String contents, Charset charset, OpenOption... options)
task.setOnFailed(event -> status.setText("Failed due to ") + task.getException());to
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!
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.
Back to the Core Java page.