Core Java

Bug Report Page

14th Edition Volume 1

Section 2.1.3
Change https://docs.oracle.com/en/java/javase/21/docs/api/search.html?q=%s to https://docs.oracle.com/en/java/javase/25/docs/api/search.html?q=%s
Section 3.7.2
Change “in Germany, the group separator is a period, not a comma” to “in Germany, the decimal separator is a comma, not a period”
Section 3.1
Remove “You compile the file with the command”
Section 3.6.3
Change “In our case, we copy everything from the beginning up to, but not including, the comma.” to “In our case, we copy everything from the beginning up to, but not including, the exclamation point.”
Section 3.10.5
Change
    IO.print(switch (args[0])) {
        case "-a" -> "🏴‍☠️";
        case "-b" -> "🍺";
        case "-h" -> "Hello,";
        default -> args[0];
    }
to
    IO.print(switch (args[0]) {
        case "-a" -> "🏴‍☠️";
        case "-b" -> "🍺";
        case "-h" -> "Hello,";
        default -> args[0];
    })

Section 4.10.7
Change
@see com.horstmann.corejava.Employee#<init>()
to
@see com.horstmann.corejava.Employee#Employee(String, double, int, int, int)
Section 6.3.7
Change
public static Pair longestRun(double[] values)
to
public static Range longestRun(double[] values)
and “the nested Pair class” to “the nested Range class”
Section 8.1.4
Change “(public static, in our case)” to “(such as public static)”
Section 8.1.5
Change minmax to min (2x)
Section 8.4.2
Change Pait<Manager> to Pair<Manager>
Section 8.5.6
Change new Pair<T>(new T(); new T()) to new Pair<T>(new T(), new T()) and Pair.makePair(String.class) to makePair(String.class)
Section 9.3.3
Change
java v1ch09.set.SetDemo gutenberg/alice30.txt
to
java v1ch09.SetDemo gutenberg/alice30.txt
Section 10.4.2
Change “the newThreadPerTaskExecutor method” to “the newVirtualThreadPerTaskExecutor method”

14th Edition Volume 2

Section 4.3.3
Sadly, the postal service is sunsetting the zip code service covered in this section. To try out another service, use this post.properties file:
url=https://codecheck.io/run
Input=
Main.java=public class Main {\n\
    public static void main(String[] args) {\n\
        System.out.println("Hello, World!");\n\
    }\n\
}\n

Credits

Thanks to Craig Davis, Amit Lamba, Michel (Mike) Rainville, Vincent Temmerman, John Westcroft, 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, 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
IO.println( * )?