Core Java

Bug Report Page

13th Edition Volume 1

Section 1.2
Change the URL for the white paper from https://www.oracle.com/technetwork/java/langenv-140151.html to https://www.oracle.com/java/technologies/language-environment.html
Section 3.3.4
Change “an integer ranging from 0 to hexadecimal 10FFF” to “an integer ranging from 0 to hexadecimal 10FFFF”
Section 3.6.9
Change
builder.append(country.charAt(0) - 'A' + REGIONAL_INDICATOR_SYMBOL_LETTER_A);
builder.append(country.charAt(1) - 'A' + REGIONAL_INDICATOR_SYMBOL_LETTER_A);

to
builder.appendCodePoint(country.charAt(0) - 'A' + REGIONAL_INDICATOR_SYMBOL_LETTER_A);
builder.appendCodePoint(country.charAt(1) - 'A' + REGIONAL_INDICATOR_SYMBOL_LETTER_A);

Section 4.6.1
Change “For example, the String class has four public methods called indexOf ” to “For example, the String class has six public methods called indexOf. ”
Section 5.1.7
Change public class Executive to public class Executive extends Manager
Section 5.9.2, 5.9.4
Change exec.getTitle().getLength() to exec.getTitle().length()
Section 6.2.5
In Table 6.1, change Integer.valueOf and Integer.sum to Integer::valueOf and Integer::sum
Section 6.3.6
Change Sting name to String name in the second note.
Section 6.3.6
Remove “In fact,” from the first note.
Section 10.5 Preview Note
Extent locals → Scoped values
Section 10.5.2
Change “few seconds or many hours or” to “few seconds or many hours”
Section 10.5.14
Change
String DATEFORMAT = dateFormat.format(new Date());
to
String dateStamp = DATEFORMAT.format(new Date());
Section 10.6.1
Change “tries for 100 milliseconds” to “tries for up to 100 milliseconds” (2×)
Section 11.2
For example, the JUnit Test annotation → For example, the JUnit RepeatedTest annotation
Section 11.5.1
by calling the one of the methods → by calling one of the methods

13th Edition Volume 2

Section 1.11
Change
Map<String, Integer> stateToCityPopulation = cities.collect(
   groupingBy(City::state, averagingInt(City::population)));
to
Map<String, Double> stateToCityPopulation = cities.collect(
   groupingBy(City::state, averagingInt(City::population)));
Section 11.1
Change “(see Figure 9.2)” to “(See Figure 11.1)”, “Figure 9.3 shows the interactions among model, view, and controller objects.” to “Figure 11.3 shows the interactions among model, view, and controller objects.”
Section 11.2.3
Change “The calculator program in Figure 9.4” to “The calculator program in Figure 11.10”
Section 11.4.1
Change “Figure 9.5 shows a simple program” to “Figure 11.12 shows a simple program”
Section 11.4.2
Change “Figure 9.6 shows a typical example” to “Figure 11.13 shows a typical example” and change “If you look again at Figure 9.5, you will note that the appearance of the radio buttons is different from that of checkboxes in Figure 9.6” to “If you look again at Figure 11.13, you will note that the appearance of the radio buttons is different from that of checkboxes in Figure 11.12”
Section 11.4.4
Change “(see Figure 9.7)” to “(see Figure 11.15)”
Section 12.7.5
Change
AttributeSet attributes = job.getAttributes();
var copies = (Copies) attribute.get(Copies.class);
to
AttributeSet attributes = job.getAttributes();
var copies = (Copies) attributes.get(Copies.class);

Credits

Thanks to Mike Bannan, Tish Brush, Elia Colombo, Michel (Mike) Gerard Rainville, Badri Srivatsa, Winston Tsai, Qilin Yao, Xiutao Zang, Andrey Zhuchkov and (your name might go here) for their bug reports!

Prior Edition Errata

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:

Edition:
Section number:

Problem description:

To protect against spam robots, please answer this simple problem: What is printed by
System.out.println( * )?