Big Java / Computing Concepts with Java Essentials, 3rd ed.

Bug Report Page


How to Tell which Printing You Have

On the copyright page (facing the first page of the Preface in both Big Java and Computing Concepts with Java Essentials, Third Edition), there is a printing history of the book. The printing history is a row of numbers that -- at the 1st printing -- looks like this: 10 9 8 7 6 5 4 3 2 1 At each subsequent printing, one number is removed from the end of this row of numbers to indicate which printing of the book you have. For example, the last number in the row of numbers in the 2nd printing is 2, and so on. [B2C3] = fixed in Big Java's 2nd printing [B4C3] = fixed in Big Java's 4th printing, CCJ's 3rd printing [B4C4] = fixed in Big Java's 4th printing [B5C4] = fixed in Big Java's 5th printing, CCJ's 4th printing [B6C5] = fixed in Big Java's 6th printing

Book Errata

Page vii (CCJ only) line 14
Change "binary trees and hash tables" to "stacks and queues".
[B4C3] Page xi
Add "Michael Overton, New York University" to the list of reviewers in the Acknowledgments
[B5C4] Page xii (Big Java) / Page ix (CCJ)
Change "Monica Sweck, Unversity of Florida" to "Monica Sweat, Georgia Institute of Technology".
[B4C3] Page 12
Change the URL in the figure caption from to
[B6C5] Page 21 Syntax 2.1
Remove the semicolon after System.out.println("Hello, Dave!").
[B2C3] Page 30
Change "Appendix A5" to "Appendix A6 ". (Big Java) Change "Appendix A3" to "Appendix A2". (CCJ)
[B6C5] Page 40 Syntax 2.2
Add a line or below TypeName variableName;
[B6C5] Page 54
Change system.out.println to System.out.println.
[B4C3] Page 54
Change "@param the amount to withdraw" to "@paramamount the amount to withdraw"
[B6C5] Page 76 Exercise P2.12
Change getName(), getPrice() and setPrice() to getName, getPrice and setPrice.
[B4C3] Page 76 Exercise P2.16
Change wait to waitForDoubling. (There is already a wait method in the Object class, and we aren't allowed to change it.)
[B4C3] Page 76 Exercise P2.17
Change wait to waitAMonth. (There is already a wait method in the Object class, and we aren't allowed to change it.)
[B4C3] Page 95 Table 1
The descriptions for Math.toDegrees and Math.toRadians are switched. In the entry for atan2, change [-π/2, π/2] to [-π, π] In the entry for atan2, change "... x may be 0" to "... x may be 0 ) Add two lines
Math.max(x, y) The larger of x and y
Math.min(x, y) The smaller of x and y
Page 113
Change newInputStreamReader to new InputStreamReader.
[B6C5] Page 114
Change "You'll have to wait for Chapter 15" to "You'll have to wait for Chapter 14"
[B4C3] Page 116
Remove lines 36 and 37.
[B4C3] Page 128 Exercise P3.7
Change MILES_TO_KM = 0.621 to MILES_TO_KM = 1.609
[B6C5] Page 126 Exercise P3.4
Change "prompts the user for two integers" to "prompts the user for two numbers".
[B4C3] Page 129 Exercise P3.12
Change public double nextDigit() to public int nextDigit().
[B4C3] Page 130 Exercise P3.14
Change metMinutes to getMinutes
[B4C3] Page 146 Figure 7
(x, y) coordinate should point to top-left corner.
[B4C3] Page 159
Change the third coordinate pair on top of the flag from (160, 160) to (160, 100)
[B4C3] Page 159
Change Rectangle2D.Double rightRectangle = new Rectangle2D.Double(xLeft + width / 3, yTop, to Rectangle2D.Double rightRectangle = new Rectangle2D.Double(xLeft + 2 * width / 3, yTop,
[B6C5] Page 169
Remove lines 25 and 26.
[B4C3] Page 172
Change "ypixel = (yuser - ymin) · (height - 1) / (ymax - ymin)" to "ypixel = (yuser - ymax ) · (height - 1) / (ymin - ymax )"
[B4C3] Page 173
Change "ymax = 50" to "ymax = 40" and final double YMAX = 50 to final double YMAX = 40 (for consistency with the code and the screen capture)
[B4C3] Page 174
Change private static final double YMAX = 50 to private static final double YMAX = 40
[B6C5] Page 177
Change "you need to divide the point size by Math.max(xscale, -yscale) to "add the call g2.setFont(g2.getFont().deriveFont(AffineTransform.getScaleInstance(1 / xscale, 1 / yscale)))."
[B5C4] Page 179
Change the third call to g2.draw from g2.draw(new Line2D.Double(xpixel(2), ypixel(0), xpixel(1), ypixel(3)) to g2.draw(new Line2D.Double(xpixel(1), ypixel(0), xpixel(1), xpixel(3)).
[B4C3] Page 182
In Exercise R4.14, change "What are the three different classes for specifying rectangles ..." to "What are the four different classes for specifying rectangles in the Java library?
[B4C3] Page 184
In Exercise P4.13, change "Exercise P4.11" to "Exercise P4.12".
[B2C3] Page 194 Common Error 5.1
Change "with the letters H e l l" to "with the letters R o b"
[B6C5] Page 196
Change "You will learn how to do that in Chapter 9" to "You will learn how to do that in Chapter 11"
[B4C3] Page 219 R5.1
In Exercise R5.1, remove the ninth bullet. The question should be: int x = Integer.parseInt(input); if (x != null) y = y + x;
[B4C3] Page 224 P5.10
Change "Enter three strings" to "Enter four strings"
[B4C3] Page 224 P5.13
In Exercise P5.13, change "30 days" to " 31 days."
[B4C3] Page 225 P5.15
In Exercise P5.15, change "Enhance the BankAccount class of Chapter 3 by ..." to "Enhance the BankAccount class of Chapter 2 by ..."
[B4C3] Page 225 P5.17
In Exercise P5.17, change "Define seven objects of a class UnitConverter ..." to "Define objects of a class UnitConverter ...". Remove "(ml, l, g, kg, mm, cm, m, km)." from the question.
[B4C3] Page 232 Common Error 6.2
Change targetBalance to 2 * initialBalance.
[B4C3] Page 249
Add a line System.exit(0); after line 30
[B6C5] Page 250
Change return data to return.
[B2C3] Page 255
Add a line System.exit(0); after line 29.
[B2C3] Page 263
There is a colored needle missing in Figure 6.
[B4C3] Page 263 last row of the table
Change "between 0 (inclusive) and n (exclusive)" to "between 0 (inclusive) and 1 (exclusive)"
[B4C3] Page 265 File
In the constructor, after line 13, add a line " tries = 0; "
[B6C5] Page 268
Change i-- to i--;
[B4C3] Page 269
Change "In Advanced Topic 6.7 we introduced ..." to "In Advanced Topic 6. 8 we introduced ..."
Page 269
Change "On the other hand, if iold is odd, then rnew = rold x aold to On the other hand, if iold is odd, then rnew = rold x bold
[B4C3] Page 272 R6.3
Change for (i = 10; i > 0; i-) ... to for (i = 10; i > 0; i--) ...
[B4C3] Page 284 line 21
Change the line public Purse to public class Purse
[B5C4] Page 291
Change other.balance + amount (or Account.balance + amount in a bungled correction) to otherAccount.balance + amount
[B6C5] Page 301
Change private static lastAssignedNumber = 0 to private static int lastAssignedNumber = 0
[B6C5] Page 304
Change private static lastAssignedNumber to private static int lastAssignedNumber
[B6C5] Page 309
Change "(see Quality Tip 2.2)" to "(see Quality Tip 3.2)".
[B6C5] Page 309
Change "generalized regular expression pattern" to "global regular expression print".
Page 309
Advanced Topic 7.4 is a duplicate of Advanced Topic 2.3.
[B6C5] Page 316
Change (such as homework1.Bank ...) to (such as homework1.Bank ...), with a space after "as"
[B4C3] Page 316 Step 3
Change /home/bwalters/homework1 to /home/walters/homework1.
[B6C5] Page 327 Exercise P7.11
Change "correction digit" to "check digit" (4x)
[B4C3] Page 330
Change the caption of figure 1 to "Approximating a Square Root"
[B4C3] Page 349
Remove lines 59 and 60
[B4C3] Page 352
Change Syllables in hello: 2 to Syllables in hello: 1. Change "That's better, but there is still a problem" to " Unfortunately, there is still a problem".
[B6C5] Page 360
Change "arcsin(-1) = π/2" to "arcsin(-1) = -π/2"
[B4C3] Page 360
Change the numerator of the last term of the arcsin(x) expansion from "32 + 52 + 72 · x9" to "32 · 52 · 72 · x9"
[B6C5] Page 380
Change "The object new Coin("dime", 0.1)" to "The object new Coin(0.1, "dime")"
[B5C4] Page 392
Add a semicolon after boolean accept(Object x) and void draw(Graphics2D g2).
[B5C4] Page 393
Add a semicolon after String readLine(String prompt) throws IOException.
[B5C4] Page 393 P9.16
Change "introduced in Chapter 3" to "introduced in Chapter 7".
[B6C5] Page 406
Remove the semicolon after the closing } before ActionListener listener...
[B4C3] Page 406
Replace "final JTextField yField = new JTextField(5);;" with "final JTextField yField = new JTextField(5);"
[B4C3] Page 408
Replace "final JTextField yField = new JTextField(5);;" in with "final JTextField yField = new JTextField(5);" Remove semicolon after inner class MoveButtonListener.
[B5C4] Page 410
Change rightListener = new ButtonListener() to rightListener = new Right ButtonListener()
[B4C3] Page 410
In method makeButton(String Label, ...), remove semicolon after inner class ButtonListener.
[B4C3] Page 412
Remove semicolon after inner class ButtonListener.
[B2C3] Page 421, Figure 7
Change "The Contro l Panel for Adding ..." to "The Control Panel for ..."
[B2C3] Page 421 Caption for Figure 7
Change "Contro l" to "Control"
[B4C3] Page 444
Change void transfer(double amount, BankAccount other) to public void transfer(double amount, BankAccount other)
[B5C4] Page 453
Change public CheckingAccount to public class CheckingAccount extends BankAccount
[B2C3] Page 470 R11.12
Change the word "Conmsider" to "Consider"
[B4C3] Page 472 P11.9
Change "introduced in chapter 3" to "of Chapter 7"
[B4C3] Page 479 Common Error 12.1
Change "But panels alse have a ..." to "But panels also have a ..."
[B4C3] Page 483, Page 487
Remove the semicolon after the MoveButtonListener class.
[B4C3] Page 486
Remove second semicolon after "final JTextField yField = new JTextField(5);;"
[B4C3] Page 502 Figure 12
Shorten the line of the "Menu" caption so that it points to the top right corner of the menu but not to the "Up" menu item.
[B4C3] Page 503
Change class MenuFrame extends JFrame to public class MenuFrame extends JFrame
[B4C3] Page 503
In lines 151 and 152, change generator.nextInt(2) to generator.nextInt(3).
[B4C3] Page 506
In the MenuFrame() constructor, move the line pack() to the last line (after the second menuBar.add(...)).
[B4C3] Page 518 Exercise P12.7
Change "the rectangle position is set by two text fields for the x- and y-positions" to "the rectangle position is moved by the values entered in two text fields for the offsets in the x- and y-directions".
[B5C4] Page 533
Change data[0] == 29.95 to data[0] = 29.95.
[B6C5] Page 544
Change Employee[] staff; to Employee[] employees;
[B6C5] Page 545
Change "see Exercise P13.15" to "see Exercise P13.16"
[B5C4] Page 552 P13.4
Change a.append(b) to a.transfer(b).
[B4C3] Page 552 P.13.7, P13.8
Change public void draw(Graphics2Dg) to public void draw(Graphics2D g2)
[B5C4] Page 580 P14.9
Change connection = u.openConnection(u) to connection = u.openConnection()
[B5C4] Page 596
Change "can throw a ClassCastException" to "can throw a ClassNotFound Exception".
[B6C5] Page 604 line 28
Change ;; to ;
[B6C5] Page 611
Change "frequencies of the letters (see [5])" to "frequencies of the letters (see [4])"
[B4C3] Page 613 Exercises 15.12, 15.14
Change Section 15.6 to Section 15. 7
[B6C5] Page 621
Change "explains in his famous book [4]" to "explains in his famous book [3]"
[B4C3] Page 636
Change private Customer theCustomer; private Vector items; to private Address billingAddress; private ArrayList items;
[B6C5] Page 637
Remove the first 2 lines.
[B4C3] Page 647 Figure 13
Change BankAcccount to BankAccount .
[B4C3] Page 649 after line 13
Replace the blank line above the } with a line containing ...
[B4C3] Page 661 R16.6
Change "Aggregation" to "Association"
[B4C3] Page 662 R16.10
Change "Chapter 9" to "Chapter 11"
[B4C3] Page 663 P16.2
Change "Number - Format" to "NumberFormat"
[B4C3] Page 664 P16.6
Remove the sentence "Bumper cars are located in grid points (x, y), where x and y are integers between - 10 and 10" and the parenthetical remark (that is, x or y is 10 or - 10)"
[B4C3] Page 675
Change s.length() to word .length() in constructor.
Page 681
The 11th line from the bottom should be text.substring(1, text.length() - 1)); The last line should be text.substring(0, text.length() - 1));
Page 682
The 7th line should be text.substring(1, text.length()));
[B6C5] Page 689
Change "the Fibonacci sequence introduced in Chapter 5" to "the Fibonacci sequence introduced in Exercise P6.5".
[B6C5] Page 691
Change "the trace for computing fib(5)" to "the trace for computing fib(6)".
[B6C5] Page 694 top of page
   else return false;
   else return false;
[B5C4] Page 699 P17.5
Change int n = s.find("sip"); to int n = s.indexOf("sip");
[B4C3] Page 699 P17.8
Change (x1y2 + x2y3+ x3y1- y1x2- y2x3- y3x1) / 2 to |x1y2 + x2y3+ x3y1- y1x2- y2x3- y3x1| / 2
[B4C3] Page 700 / 701 P17.11
Change public void nextPermutation() to public int[] nextPermutation(). Change return; to return a; (2x). At the top of page 701, change
   return a;
Remove the ... at the end of the class definition.
[B5C4] Page 706
Change line 56 of the code listing to a header. Restart the line numbers below to start at 1.
[B4C3] Page 711 6th equation
1/2 · n2 + 1/2 · n - 3" to "1/2 · n2 + 5 /2 · n - 3"
[B4C3] Page 714 Line 68
Change "Note that only one of the two while loops" to "Note that only one of the two calls to arraycopy".
[B4C3] Page 717 1st equation
Change "T(n) = 2 × 2 × 2T(n /8) + 5n + 5n" to "T(n) = 2 × 2 × 2T(n /8) + 5n + 5n + 5n"
[B6C5] Page 717 3rd equation 1st line
Change "... + 5nk" to "... + 5nm"
[B5C4] Page 724
Change 411 (under a[7]) to 511 .
Page 727
Change public class BankAccount to public class BankAccountimplements Comparable
[B4C3] Page 727
Change BankAccount other = (BankAccount)other; to BankAccount other = (BankAccount)otherObject;
[B5C4] Page 729
Show the file, not
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
/** A purse holds a collection of coins.*/
public class Purse
   /** Constructs an empty purse. */
   public Purse()
      coins = new ArrayList();

   /** Add a coin to the purse.
      @param aCoin the coin to add
   public void add(Coin aCoin) { coins.add(aCoin); }

   /** Returns a string describing the purse contents, sorted
      by coin value.
      @return the string describing the purse contents
   public String toString()
      // sort the coins first
      class CoinComparator implements Comparator
         public int compare(Object firstObject, Object secondObject)
            Coin first = (Coin)firstObject;
            Coin second = (Coin)secondObject;
            if (first.getValue() < second.getValue()) return -1;
            if (first.getValue() == second.getValue()) return 0;
            return 1;
      Comparator comp = new CoinComparator();
      Collections.sort(coins, comp);
      String r = "Purse[coins=";
      for (int i = 0; i < coins.size(); i++)
         if (i > 0) r = r + ","; r = r + coins.get(i);
      return r + "]";

   private ArrayList coins;
[B4C3] Page 733 R18.14
Change "Exercise P18.7" to "Exercise 18.8".
[B4C3] Page 735 R18.18
Change "vector" to "array list".
[B5C4] Page 742
Change class LinkedList to public class LinkedList
[B5C4] Page 743
Change class LinkedList to public class LinkedList (2 times)
[B5C4] Page 744
Change class LinkedList to public class LinkedList (2 times)
[B5C4] Page 745
Change the first private class LinkedListIterator to private class LinkedListIterator implements ListIterator
[B5C4] Pages 746, 747, 748, 751, 752
Gudmund Skovbjerg Frandsen suggests an improvement in the behavior of the remove method. Calling remove twice, or calling it immediately after calling add, should always be detected as an error. In order to detect this condition reliably, previous and position should be set to the same value after calling remove or add . (The old implementation tested for previous == null. This test did not detect the error condition when the first element of the list was removed.) Make the following changes: 1. On page 746, change "If the previous reference is null " to "if the previous reference equals position ". Change "Therefore, the remove method sets the previous reference to null " to "Therefore, the remove method sets the previous reference to position". 2. On page 747 and on page 751 / 752 lines 144 ... 159, change the remove method to:
public void remove()
   if (previous == position)
   throw new IllegalStateException();
   if(position == first)
   { =;
   position = previous;
3. On page 748 and on page 751 line 137, change previous = null; to previous = position;
[B6C5] Page 757
Remove "and in Chapter 20" in the last line of section 19.3.
[B6C5] Page 763
Change "P19.3" to "R19.3".

The following errata apply to Big Java only.

[B6C5] Page 780
The implementation of the HashSetIterator is flawed. Here is a replacement for lines 124 ... 194:
   private class HashSetIterator implements Iterator
       * Constructs a hash set iterator that points to the first element of the
       * hash set.
      public HashSetIterator()
         current = null;
         bucket = -1;
         previous = null;
         previousBucket = -1;

      public boolean hasNext()
         if (current != null && != null) return true;
         for (int b = bucket + 1; b < buckets.length; b++)
            if (buckets[b] != null) return true;
         return false;

      public Object next()
         previous = current;

         previousBucket = bucket;
         if (current == null || == null)
            // move to next bucket

            while (bucket < buckets.length && buckets[bucket] == null)
            if (bucket < buckets.length)
               current = buckets[bucket];
               throw new NoSuchElementException();
         else // move to next element in bucket
            current =;

      public void remove()
         if (previous != null && == current)
         else if (previousBucket < bucket)
            buckets[bucket] =;
            throw new IllegalStateException();
         current = previous;
         bucket = previousBucket;

      private int bucket;
      private Link current;
      private int previousBucket;
      private Link previous;
(A prior attempt at fixing this problem had a subtle error--the line previousBucket = bucket was inside the if statement. Thanks to William J. Seaman for his vigilance in this matter.)
[B4C3] Page 783
Change "the Unicode table from Appendix A5" to "the Unicode table from Appendix A 6"
[B6C5] Page 791 Figure 9, Page 792 Figure 10
Dick's node should have "null" in the second cell.
[B6C5] Page 792 Figure 10
Tom's node should have the arrow to Romeo's node emanating from the second cell, and "null" in the third cell.
[B6C5] Page 796 Figure 11
Dick's node should not have "null" in the third cell.
[B4C3] Page 815
Change "between 0 (or Thread.MIN_PRIORITY )" to "between 1 (or Thread.MIN_PRIORITY )"
[B4C4] Page 821 Figure 1
In "Thread 1" (on the right), change "print "Depositing ..."" to "print " Withdrawing ..."". Change balance + amount to balance - amount.
[B6C5] Page 823
Change "" to ""
[B4C4] Page 847 Exercise R21.11
Change "What happens a thread calls" to "What happens when a thread calls"
[B4C4] Page 847 Exercise R21.13
Change "Advanced Topic 21.3" to "Advanced Topic 21. 4"
[B4C4] Page 862 Table 2
Change "The balance" to "nand the balance" (1x) and "The new balance" to "nand the new balance" (2x)
[B4C4] Page 875
Change GET to GET /cgi-bin/... (Remove the host from the GET command.)
[B4C4] Page 876
Change POST to POST /cgi-bin/... (Remove the host from the POST command.)
[B4C4] Page 877
Change "It expect a POST" to "It expects a POST"
[B4C4] Page 882
Change URLConection to URLConnection
[B4C4] Page 899
Change Product.Product_Code = Invoice_Number.Product_Code to Product.Product_Code = Item.Product_Code
[B6C5] Page 902
Change "This particular number is not actually a Social Security number belonging to any person. It was printed on sample cards that were inserted in wallets in the 1940s and 1950s" to "This particular number was printed on sample cards that were inserted in wallets. It actually was the social security number of the secretary of a vice president at the wallet manufacturer. When thousands of people used it as their own, the number was voided, and the secretary received a new number." For more information, see
[B4C4] Page 903
Change "such as Cloudscape, InstantDB, and Pointbase" to "such as CloudScape and PointBase". (InstantDB seems to have been dropped by its vendor.)
[B4C4] Page 904
Remove "such as the Cloudscape database which is freely available at". (Sadly, the Cloudscape database is no longer freely available. See the FAQ for possible alternatives.)
[B6C5] Page 905
Change "from the InstantDB database" to "from the Cloudscape database"
[B5C4] Page 908
Change String driver = props.getProperty("jdbc.driver"); url = props.getProperty("jdbc.url"); String username = props.getProperty("jdbc.username"); String password = props.getProperty("jdbc.password"); to String driver = props.getProperty("jdbc.driver"); url = props.getProperty("jdbc.url"); username = props.getProperty("jdbc.username"); password = props.getProperty("jdbc.password");
[B4C4] Page 912
Change int quantity = result.getDouble("Quantity"); to int quantity = result.get Int ("Quantity");
[B4C4] Page 914
Change String columnSize = metaData.getColumnDisplaySize() to int columnSize = metaData.getColumnDisplaySize()
[B5C4] Page 929
Change Statement stat = conn.getStatement() to Statement stat = conn. create Statement(). Change stat.commit() and stat.rollback() to conn.commit() and conn.rollback().
[B4C4] Page 938 Exercise P23.3
Change "from Section 15.6" to "from Section 15. 7
[B4C4] Page 952
Change <zip>94085</state> to <zip>94085</zip>
[B6C5] Page 955
Change nodes.item(j) to nodes.item(i).
[B6C5] Page 957 Figure 5
Change <name> to <description> (2x).
[B4C4] Page 957
Change Node anAttributeNode = nodes.item(i) to Node anAttributeNode = attributes.item(i)
[B6C5] Page 965
Change <zip>94080-1098</state> to <zip>94080-1098</zip >
[B4C4] Page 968
Change <factor> ::= <integer> || (<expression>) to <factor> ::= <integer> | (<expression>) (that is, remove one vertical bar)
[B4C4] Page 969
1. The leftmost "-" should be a child of the leftmost <integer> node, not the <digits> node. That node should be slightly to the left of the <integer> node, and the <digits> node should be slightly to the right. 2. The <digit> and "2" nodes should be directly below the <digits> node, not to the right. 3. There are two <expression> nodes below each other on the right half of the figure; the top one should be eliminated.
[B6C5] Page 978 Table 1
Change "Greater than (left angle bracket)" to "Greater than (right angle bracket)"
[B6C5] Page 978 Table 1
Add a semicolon after &apos
[B6C5] Page 979 Table 2
Change "followed by E2 or ..." to "followed by E2, ..."
[B6C5] Page 984 Step 3 bullet 2
Change description to address.
[B6C5] Page 985 Step 5 bullet 2
Change quantity to number.
[B6C5] Page 985 Step 5
The bullets are not correctly placed. The list should look like this:
  • number
  • address
  • items
  • name
  • company
  • street
  • city
  • state
  • zip
  • item
  • product
  • quantity
  • description
  • price
[B6C5] Page 1001 Exercise P24.12
Change the second <point> to </point>.
[B6C5] Page 1007
In the code for the PersonBean class, change "// name property" to "// lastName property".
[B6C5] Page 1009 time.jsp
Change <h1>Date JSP</h1> to <h1>Time JSP</h1>.
Page 1040 line 5
Change Simple-DataSource to SimpleDataSource.
[B5C4] Page 1042 zonedb.jsp Line 1
Change class = "DBConnBean" to class = "DataSource Bean"
[B5C4] Page 1042 zonedb.jsp
Remove lines 19 and 20
[B6C5] Page 1046 line 84
Change result.getString(1) to result.getString(1).trim(). (Some readers had trouble with databases that padded strings with spaces.)
[B6C5] Page 1054
After the line containing the word "becomes", change
[B4C4] Page 1060 Exercise P25.1
Change getProperties to getProperty.
[B4C4] Page 1085
Remove the entry for null. (Language lawyers keep pointing out that it is not a keyword, just a literal constant.)
[B4C4] Page 1085
Add a table entry "strictfp Use strict rules for floating-point computations" to the keyword table.
[B6C5] Page 1110 static double ceil(double x)
Change "the smallest integer ≤ x" to "the smallest integer ≥ x".
[B6C5] Page 1111 static double floor(double x)
Change "the largest integer ≥ x" to "the largest integer ≤ x".
[B4C3] Page 1111 (CCJ page 799)
Add two entries
[B6C5] Page 1120
Change the second void close() to void commit().
[B6C5] Page 1120
Change the third void close() to void rollback().
[B6C5] Page 1142
Change JTextArea(int columns) to JTextArea(int rows, int columns).
[B6C5] Page 1165
Change "0.b1b2b3 x 2e " to "b0.b1b2b3 x 2e ". Change "the digits b1b2b3 form the mantisssa" to "the digits b0.b1b2b3 form the mantissa". Change "is the one where b1 ≠ 0" to "is the one where b0 ≠ 0" Change "0.1100100binary x 27" to "1.100100binary x 26". Change "For example, the mantissa 0.1100100 is stored as 100100" to "For example, the mantissa 1.100100 is stored as 100100" Change "For example, the exponent e = 7 would be stored as 134" to "For example, the exponent e = 6 would be stored as 133" Change "100decimal = 0|100000110|10010000000000000000000single-precision IEEE" to "100decimal = 0|10000101|10010000000000000000000single-precision IEEE"
[B6C5] Page 1167
Change "and 5decimal = 101binary" to "and 13decimal = 1101binary".

Companion Code Errors

Download the latest version of to get the fixed files.

There was a typo in the file (but not in the book).
ch08/log directory:
  1. Remove the file
  2. In, change logger.log to (4x)
  3. Add import java.util.logging.Logger; to the top of
  4. In, change Logger logger = new Logger(); to Logger logger = Logger.getLogger("global");
  5. In, change Logger.assert(income >= 0); to assert income >= 0;
Remember to compile with the -source 1.4 option.
Image files in ch10:
These files were corrupted.

Thanks to Barry Adams, Chr. Bohr-Halling, Tom Box, Peter Broomhead, Lara Burton, Paul Crockett, D. Bruce Erickson, Mark Francillon, Gudmund Skovbjerg Frandsen, Jonathan Grall, Rick Giles, Thom Gillis, Deborah Hargrove, Nina Horstmann, Ulrich Karstoft Have, Rodney Hoffman, Julie Hu, David Johnson, Cindy Johnson, Asha Khakpour, Jason Khallouf, Carlos Lisbôa, Feng Ping Liu, Jamiiru Luttamaguzi, Marc Malloy, Jason Mattinson, Mary Misiaszek, Majid Mohammad, Mohamed Najmeddine, Kathleen O'Brien, Kwangshin Oh, John Pedersen, Tim Pointon, Mansour Rakhmanov, David Regan, Stan Robertson, George Rypysc, William J. Seaman, Louise Skouboe, Elin Stoevring, Charles L. Sykes, Vincent Tan, Fran Trees, Roland Veloz, Jørgen Villadsen, Andrew Watters, Stuart Williams, Jackey Yang, and a number of anonymous contributors for their bug reports and suggestions

Please report any remaining bugs in this edition on the bug report form.