Big Java Late Objects / Java Concepts Late Objects
Bug Report Page

- Page 81 Exercise P2.13
- Move 2π from the numerator to the denominator three times: `f=1/(2pi sqrt(L C))`, `f_min=1/(2pi sqrt(L C_max))`, `f_max=1/(2pi sqrt(L C_min))`
- Chapter 2 VitalSource Chapter Review Problem 8
- number of groups = integer part of (total width - tile width) / (2 x tile width) should not be part of the solution.
- Page 216 Section 5.2
- In Self Check 9, change
double result = (x + y) / (y - x);
to int result = (x + y) / (y - x);
- Page 242 Section 5.9
- In the program fragment at the very end, change
for (int j = 0; j < i; j++)
to
for (int j = 0; j <= i; j++)
- Page 284 Special Topic 6.3
- Change
void sum to int sum (2×)
- Page 293 Section 6.6
- Change While (i < size / 2) to While i < size / 2
- Page 300 Special Topic 6.4
- In Figure 15, the first array should have type
double[][].
- Page 339 Section 7.2.4
String line = nextLine(); should be String line = in.nextLine();
- Page 374 Chapter 7 Solution to Self Check 10
pre while (!Character.isWhiteSpace(line.charAt(j))) should be
while (Character.isWhiteSpace(line.charAt(j)))
- Page 374 Chapter 7 Answer to Self Check 12
- Change null null to "" ""
- Page 420 Common Error 8.4
- Change “Between class and instance variable names (
Math.PI)” to “Between the names of classes and static variable names (Math.PI)”
- Page 428 Exercise 8.10
- Change
public void getPosition() to public double getPosition()
- Page 452 Syntax 9.2
- Change
choices = new ArrayList<String>; to choices = new ArrayList<String>();
- Worked Example 9.1
- Change
hours_worked to hoursWorked
- Chapter 13 Section 5 VitalSource Self Check 5
- Change “whether the portion of an array” to “whether the portion
a[from]...a[to-1] of an array a”
- Page 640 Section 13.6 Self Check 20
- “with the first queen in position
a2” should be “with the first queen in position b1”
- Page 671 Section 14.6
- Change the last equation from T(n) = 1 + log2(n) to T(n) = T(1) + log2(n)
- Page 700 Section 15.1 Self Check 9
- Change “Write a loop that prints every second element of a linked list of strings called
words.” to “Write a loop that prints every other element of a linked list of strings called words, starting with the element at the front.”
- Page 718 Section 15.6.3
- In the last row of the “Unprocessed Input” column in the last table, change 4 + 5 to 4 × 5
- Page 720 Section 15.6.3
- Change While the top of the stack has a higher precedence than op to While the precedence of the top of the operator stack is at least that of op
- Page 725 Standard Library Items
- Change
TreeSet<K, V> to TreeSet<E>
- Page 736 Section 16.1.1
- Instead, we make ... outer class → Instead, we make
Node an inner class inside the LinkedList class. The methods of the outer class can access the public features of the inner class. (We could even declare the inner class as private, so that it cannot be accessed anywhere other than from the outer class. However, for simplicity we do not do that in this book.)
- Page 738 Section 16.1.3
- a private inner class → an inner class
- Page 769 Section 16.4.5
- Change the first two lines of the program run to
Sue
Harry
- Page 772 Exercise R16.16
- Change “the reference at position n – n % 10” to “the reference at index
n / 10”
- Page 775 Exercise P16.1
- Remove
static from the getNode method.
- Page 804 Section 17.4 Self Check 23
- “Figure 17” should be “Figure 16”
- Page 806 Section 17.5.1
- Change log(n + 1) to log2(n + 1) (2x)
- Page 824 section_7/HeapSorter.java
- Change the comment “Sorts an array, using selection sort.” to “Sorts an array, using heap sort.”
- Page 826 Section 17.7 Self Check 38
- Change to: “What is the result of calling
HeapSorter.fixHeap(a, 1, 4) and then HeapSorter.fixHeap(a, 0, 4) where a contains 1 4 9 5 3?”
- Page 836 Chapter 17 Answer to Self Check 29
- In the last figure, the "X" node should not be the right child node of node n2 but should be the right child node of n4.
- Chapter 17 Worked Example 2 Page 13
assertEquals(letters, t.toString().remove(" ", ""));
should be
assertEquals(letters, t.toString().replace(" ", ""));
- Chapter 17 Worked Example 2 Page 14
- Change “435,974,400 red-black trees with black height 2” to “25,728,160,000 red-black trees with black height 3”
- Chapter 17 Worked Example 2 Page 18
- Change “The resulting tree has constant black height, but it might still not be a valid red-black tree because it might have double-red violations. We could test just that, but we need to have a general method that tests the red-black properties after the removal.” to “The resulting tree might not be a valid red-black tree. It might have some leaves with greater black height than the node to be removed, or it might have double-red violations. We will develop a method to check that a red-black tree is valid and call it before and after the removal.”
- Chapter 17 VitalSource Interactive Review and Practice / Chapter Review Question 7
- In the third question and the explanation, change “a right child of the root” to “a left child of the node holding 18”.
- Page 845 Section 18.3 Self Check 13
- Change “If you have an array list
ArrayList<String> a = new ArrayList<>(10);
how do you fill it with ten "*"?” to: “If you have an ArrayList<String> a, how do you replace all elements with "*"?”
- Page 851 Section 18.5 Self Check 22
- Change to: “Suppose we want to implement a method that computes both the minimum and maximum of an array of measurable objects, returning an array of length 2:
public static <E extends Measurable> E[] minmax(E[] objects)
Why
doesn’t this work?” Change the answer to: The method would need to create the array of length 2 and type E. However, you cannot construct an array of a generic type.
- Page 852 Common Error 18.3
private static class → static class
- Page 871 Programming Tip 19.2
- Change
if (difference != 0) { return 0; } to if (difference != 0) { return difference; }
- Testbank Chapter 19 Problem 64
- Change “
(k, v) -> v + 1” to “(p, v) -> p + 1” (4x)
- Testbank Chapter 19 Problem 65
- Change “
(d, s) -> v + 1” to “(p, v) -> p + 1” and “(d, s) -> v + sales” to “(p, v) -> p + sales” (3x)
- Section 22.3 WebGet.java
- Change
\n to \r\n (3x)
- Appendix E Page A-30
- a private inner class → an inner class
- Glossary entry for Unicode
- Change the entry to: “A standard code that assigns code values to characters used in scripts around the world.”
Thanks to Hossein Darbandi, Michael D'Egidio, Daniel Ford, Stephen Gilbert, Joaquim Mendes, Barry Nichols, Raymond Novak, Mark Oliva, Anthony Rutledge, Larry A. Taylor, Pooja Yalla, 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!