Core Java SE 9 for the Impatient

Bug Report Page

.

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

1 17

The first number (1 in this example) is the printing number.

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.

Page 14
Change “The name of a variable (as well as a method or class) must begin with a letter. It can consist of any letters, digits, and the symbols _ and $.” to “The name of a variable (as well as a method or class) can consist of any letters, digits, and the symbols _ and $. It cannot begin with a digit.”
Page 61
Change "need know" to "need to know"
Page 109
Change “suppose the IntSequence class provides methods” to “suppose the IntSequence interface provides methods”
Page 141
Change “There is a good number of final classes in the Java API” to “There are a good number of final classes in the Java API”.
Page 204
Change “If input fails when using a Scanner, the Scanner class catches the input exception and closes the resource from which it consumes input. What happens if closing the resource throws an exception? How does this implementation interact with the handling of suppressed exceptions in the try-with-resources statement?” to “If input fails when using a Scanner, the Scanner class catches the exception and stops reading from the input source. What happens when the scanner is closed, and closing the input source throws an exception? Compare this behavior with the handling of suppressed exceptions in the try-with-resources statement.”
Page 115
Change
int difference = first.length() < second.length();
to
int difference = first.length() - second.length();
Page 119
Change
Employee[] buttons = stream.toArray(Employee[]::new);
to
Employee[] employees = stream.toArray(Employee[]::new);
Page 130
Change “If you turned RandomInt into a nested class” to “If you turned RandomSequence into a nested class”
Page 171
Change m.invoke(obj, "********"); to m.invoke(p, "********");
Page 293
Change “between 0 and 65536” to “between 0 and 65535”
Page 315
Change
.map(Matcher::group)
to
.map(MatchResult::group)
Page 405
Change birthday.plus(Duration.ofDays(365)) to birthday.plus(Period.ofDays(365))
Page 410
Change ZoneId.getAvailableIds to ZoneId.getAvailableZoneIds()
Page 417 Table 12-9
Change TimeStamp.from(instant) to Timestamp.from(instant), timeStamp.toLocalDateTime() to timestamp.toLocalDateTime(), and Timezone.getTimeZone(id) to TimeZone.getTimeZone(id). The two last "Classes" entries should be ZoneIdjava.util.TimeZone and Instantjava.nio.file.attribute.FileTime.
Page 417
Change
today.with(next(w -> getDayOfWeek().getValue() < 6))
to
today.with(next(w -> w.getDayOfWeek().getValue() < 6))
Page 434
Change
String message = MessageFormat("It is now {0,time,short}.", Date.from(Instant.now()));
to
String message = MessageFormat.format("It is now {0,time,short}.", Date.from(Instant.now()));
Page 465 Exercise 7
The floating-point display was once a feature but has now been “fixed”. But there is still much left to explore. Change “What do you get? ... How can you display the actual value of b?” to “Now display b + 1 and b.add(java.math.BigInteger.ONE). Explain the results.”
Page 475
Change “requireents” to “requirements”
Page 491
Change ServiceLoader.load(serviceInterface.class) to ServiceLoader.load(ServiceInterface.class)

Thanks to Rogerio Brioschi, Chee Cheng, George M Jempty, Narendra Kangralkar, Alina Kirsanova, Lipi C.H. Lee, Ahmad Qatramiz, Campbell Ritchie, KyeongKeun Shin, Koray Tugay, Sébastien Wilmet, and (your name might go here) for their bug reports and suggestions!

Bug Report Form

Please use this form to report any bugs that you find. Please check the list of known bugs first before you report a bug. Unfortunately, I do not have the time to respond personally to every report, but I do read them all and will post updates to this page. Thank you!

Your name:

Your email address:

Edition:

Page number:

Problem description:

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