Big Java Early Objects, 6th ed. / Java Concepts, 8th ed.

Bug Report Page

. .

How to Tell which Printing You Have

On the copyright page (facing the first page of the Preface), 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.

When an error is fixed in a reprint, it is marked with a code such as [B3C2] = fixed in Big Java's 3rd printing, Java Concepts 2nd printing.

Page 76 P2.9
Change = LocalDate(1919, 4, 9) to = LocalDate.of(1919, 4, 9)
Page 85
Change “Recall from Chapter 12” to “Recall from Chapter 2”
Page 121 E3.5
Change int switch to int switchNum since switch is a reserved word (2x)
Page 141
In Self Check 10, change “positive number” to “positive integer”
Page 165 Exercise R4.21
Change “ a program” to “pseudocode for a program”
Page 175
In answer 3, change PI to Math.PI (3x)
Page 226
Change getNumericGrade to getLetterGrade
Page 253
Change year = year + n; to year = year + numberOfYears;
Page 267
In Self Check 29, change the second “The average is 88” to “The average is 84”
Page 269
Change “the first space” to “the first letter A”, and change if (ch == ' ') to if (ch == 'A' || ch == 'a') . (Without this change, the comment about declaring ch outside the loop would not be applicable.)
Page 300 Exercise P6.10
Change “Why did he, on average, lose a bet that at least one six would appear when rolling a die four times? And why did he seem to win a similar bet...” to “Why did he, on average, win a bet that at least one six would appear when rolling a die four times? And why did he seem to lose a similar bet...”
Page 301 Exercise P6.15
Change const to final
Page 305
In Answer 24, change nextDouble to hasNextDouble
Page 352 Practice It
Change E7.17, E7.20 to E7.18, E7.22
Page 365 Exercise E7.19, 20, 21. Change “Exercise E7.17” to “Exercise E7.18”.
Page 380
Change ArrayList<String> accounts to ArrayList<BankAccount> accounts and studentNames.size() to accounts.size()
Page 413 Exercise E8.5
Change “to be immutable. Change mutator methods to return new Day objects.” to “to be mutable. Change the methods addDays, nextDay, previousDay to mutate the implicit parameter, and to return void.”
Page 330
In Step 3, remove
else if (scoresSize == 1)
{
   return scores[0];
}
Page 449
Change if (input == "Q") to if (input.equals("Q"))
Page 461 Exercise P9.1
Change java.time.Instant.now().toString() to java.time.LocalTime.now().toString()
Page 461 Exercise P9.3
Change “An appointment has a description (for example, “see the dentist”) and a date” to “An appointment has a description (for example, “see the dentist”) and occurs on one or more dates”.
Page 512
Exercises E10.4 and E10.5 should have a “Java 8” icon.
Page 535
Change if (offset > LETTERS) to if (offset >= LETTERS)
Page 543
Change “until it is caught by another try block” to “until it is caught by another try statement”
Page 676
Change the numerator of the second fraction from (1 + log(2)) to 1 + log(n)
Page 684
Change “The add method adds an object after the iterator, then moves the iterator position past the new element.” to “The add method adds an object before the iterator position.”
Page 693
Change “ print all key/value pairs in a map m” to “ print all key/value pairs in a map m whose keys have type String
Page 694 Java 8 Note 15.1
Change (oldValue, value) -> oldValue + value to (oldValue, notPresentValue) -> oldValue + notPresentValue
Page 719 P15.12
Change sell quantity to sell quantity price
Page 719 P15.13
Change sell symbol quantity to sell symbol quantity price
Page 719 P15.14 Change Map<String, TreeSet<DistanceTo>> to Map<String, HashSet<DistanceTo>>.
Page 748, 751, 752 (2x)
Interchange the lines if (h < 0) { h = -h; } and position = h % arrayLength;. (In the very unlikely case that h == Integer.MIN_VALUE, this order is correct.)
Page 756 Special Topic 16.2
Change “and move that element into the slot of the removed element (Exercise P16.14).” to “and move that element into the slot of the removed element. Then rehash all elements that follow until you reach an empty slot (Exercise P16.14).” Add a bubble “Rehash this element” to the element at index h + 5.
Page 760 E16.8
Change java.util.LinkedList to java.util.List and java.util.AbstractList to java.util.AbstractSequentialList
Page 761 E16.20
Change ((a h + b) % p) % L to |((a h + b) % p) % L|
Page 763 E16.14
After “replace it with the last such element”, add “and rehash the remaining elements of the probing sequence”
Page 834
In the table of Special Topic 18.1, interchange “lower bound” and “upper bound”.
Page 842 E18.14
Change “generic class” to “generic interface”
Page 843 P18.4
Change “generic class” to “generic interface”
Page 843 P18.6
Change “Write a static generic method” to “Using the java.util.function.Predicate interface, write a static generic method”
Page 879
In answer 3, add i++; below if (s.length() > 10) { result.add(s); }
Page 893 Code listing line 76
Change
panel = new JPanel();

to

JPanel panel = new JPanel();
Page W998
Change the code
try (Socket s = server.accept())
{
   BankService service = new BankService(s, bank);
   Thread t = new Thread(service);
   t.start();
}
to
Socket s = server.accept();
BankService service = new BankService(s, bank);
Thread t = new Thread(service);
t.start();
(This is one of the few situations where try-with-resources doesn't work. The socket can only be closed when the thread is done.)
Page W999
Change lines 20 - 26 to
Socket s = server.accept();
System.out.println("Client connected.");
BankService service = new BankService(s, bank);
Thread t = new Thread(service);
t.start();
Page W1000
Change lines 35 - 37 to
try
{
   in = new Scanner(s.getInputStream());
   out = new PrintWriter(s.getOutputStream());
   doService();
}
finally
{
   s.close();
}
Page W1067
Change
String urlName = . . .;
URL u = new URL(urlName);
Document doc = builder.parse(u);
to
String url = . . .;
Document doc = builder.parse(url);
Page W1035
Change “Otherwise, the first call to result.next() fetches the data for the first row from the database.” to “Otherwise, the first call to result.next() sets the ResultSet object to visit the first row from the query result.”. Change “that all rows have been fetched” to “that all rows have been visited”. Change “Once the result set object has fetched a particular row” to “When the ResultSet object visits a particular row”
Page W1109
Change “that, is” to “that is,”
Page W1115
Change “A property is an entity ” to “A property is a value ”
Page A-65 (Appendix I)
After “Potential modifiers are public, static, final. ”, add “All constructors are private.” Change public void Card(int aValue) { value = aValue; } to private Card(int aValue) { value = aValue; }
Chapter 19 Worked Example 2 Page 2
Change
.min((s, t) -> s.length() < t.length())
to
.min((s, t) -> s.length() - t.length())

Thanks to Taylor Corey, Cromwell Cutaran, Marcello Dalpasso, Steve Gilbert, Charles Harless, Doug McNally, Karl Reese, Adrian O'Riordan, Craig Stutzman, Rick Zaccone, 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:

Page number:

Problem description:

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