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 2012”. 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.

Change "For example, the mathematical symbol for the set of integers ℤ has code point U+1D56B and is encoded by the two code units U+D835 and U+DD6B." to “For example, the mathematical symbol for the set of octonions 𝕆 (http://math.ucr.edu/home/baez/octonions) has code point U+1D546 and is encoded by the two code units U+D835 and U+DD46.”
(Why the change? When I first wrote that section, way back when in 2004, I mistook 𝕫 (U+1D56B), which is in Mathematical Letterlike Symbols, for an uppercase ℤ, which is actually U+2124 in Letterlike Symbols, as are the other more common sets ℕ ℚ ℝ ℂ and even ℍ. Apparently, so few readers care about supplementary characters that it took eight years for the error to be noticed.)
If the characters in the preceding paragraphs show up as gibberish, make sure your browser displays UTF-8.
float to double in Figure 3.1ℤ is the set of integers
to
𝕆 is the set of octonions
Change “The character ℤ” to “The character 𝕆 (U+1D546)”
trim, change “all leading and trailing spaces” to “all leading and trailing white space”tx” to “tx or Tx”. Change “Date and time” to “Date and time (T forces uppercase)” P |
Uppercase morning or afternoon marker | PM |
p |
Lowercase morning or afternoon marker | pm |
p |
Morning or afternoon marker | pm |
throws FileNotFoundException to throws IOExceptionIterable interface in Chapter 2 of Volume II” to “and the Iterable interface in Chapter 13”copyOf method in the API doc should instead be copyOfRange.String and []this in the second raiseSalary should be in boldface to match the two bold number007 above.return hireDay.clone(); to return (Date) hireDay.clone();Employee class cannot access the id instance field because it does not operate on an object. However, a static method can access a static field.” (A reader complained that the original statement is false since a static method can manipulate instance fields of other objects of the same class. For example, you can have a public static int compare(Employee a, Employee b).)Employee.getnextId() to Employee.getNextId()--see below to --see above in source line 68Object.equals to Objects.equalsint hash(Object... objects) to static int hash(Object... objects)java.lang.Objects to java.util.Objectsx > 0 to x > ystatic int compare(int x, int y). Change “java.lang.Double 7” to “java.lang.Double 1.0” and add 1.4 after static int compare(double x, double y)favorites to friends (2x)/ / / // at the beginning of two paragraphs/ before boolean isVisible()Rectangle2D bounds = f.getStringBounds(message, context);to
Rectangle2D bounds = sansbold14.getStringBounds(message, context);
createBevelBorder method, change “EtchedBorder.RAISED, EtchedBorder.LOWERED” to “BevelBorder.RAISED, BevelBorder.LOWERED”try Scanner in = new Scanner(new FileInputStream("/usr/share/dict/words")), change the comma to a semicolonByteArrayOutputStream out = new ByteArrayOutputStream(); t.printStackTrace(out); String description = out.toString();to
StringWriter out = new StringWriter(); t.printStackTrace(new PrintWriter(out)); String description = out.toString();
java MyProgram >& errors.txtto
java MyProgram 1> errors.txt 2>&1
class Interval<Serializable & Comparable> to class Interval<T extends Serializable & Comparable>System.println to System.out.printlnCollection<K> values() to Collection<V> values()Map.Entry” to “a class implementing the Map.Entry interface”get and put are serialized” to “get and put are synchronized”java.util.concurrent.ExecutorCompletionService to java.util.concurrent.ExecutorCompletionService<V> and change all T to V in the box below
BufferedReader in = new BufferedReader(
new InputStreamReader(new FileInputStream("employee.txt"), "UTF-8));to
BufferedReader in = new BufferedReader(
new InputStreamReader(new FileInputStream("employee.txt"), "UTF-8"));
q” to “when resolved with p”"../fred/myapp" to "../fred/myprog"files.readAttributes to Files.readAttributes (2x)public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException
{
if (attrs.isDirectory())
System.out.println(path);
return FileVisitResult.CONTINUE;
}
to
public FileVisitResult preVisitDirectory(Path path, BasicFileAttributes attrs) throws IOException
{
System.out.println(path);
return FileVisitResult.CONTINUE;
}
\" java.nio.file.Files, all the methods should be marked as static.], make it the first item."while (in.hasNextLine() != null) to while (in.hasNextLine())currentDateFormat.setLenient to currentTimeFormat.setLenientObject[] selection = source.getSelectedValues();to
List<String> selection = source.getSelectValuesList();
getSelectedValues() to getSelectedValuesList()add(table.getTableHeader(), BorderLayout.NORTH);
add(table); to add(new JScrollPane(table));TableStringConverter has been set for the comparator” to “If a TableStringConverter has been set for the sorter”, and change orter.setStringConverter to sorter.setStringConverterjavax.swing.table.TableStringConverter<M extends TableModel> to javax.swing.table.TableStringConverterjavax.swing.table.TableCellEditor in italicjavax.swing.tree.TreeModel in italicRendering-Hints should be RenderingHintsfloat 20.0f; to float b = 20.0f;engine.put(b, ...) to engine.put("b", ...)scope.put(b, ...) to scope.put("b", ...)int severity() = 0;to
int severity() default 0;
Thanks to Yasir Bajwa, Patrick Brinich-Langlois, Joe Cassara, Neal Crawford, Russell Dauterman, Chen Dong, Peter Drake, Mehmet Erten, Adrian Fabian, Ken Frazer, Kirk Goff, Paul Grabow, Micha Guzek, Pedro Juan Hidalgo, Jan Huysmans, Manuel Irribarra, Andrew Janke, Harri Jauri, Xiaoyu Jiang, Reza Khedmati, Vadim Kramer, Bo Li, Mike McMenemy, Stevens R. Miller, Julie Nahil, Dennis Oleksyuk, Ivonne Roberts, Peg Russell, Anubhav Saggi, Anton Suprunyuk, Grzegorz Szpetkowski, Arzu Tarimci, Sergey Travin, Yuriy Trubitsyn, Sergey Vaysman, Shawn Wallis, Christopher Whidden, Christian Wilkie, Jim Woodruff, Scott Wright, Garrett Xu, Leo Zhang, and (your name might go here) for their bug reports!
Please report any remaining bugs in this edition on the bug report form.