Authors' official companion web site
2.5 * 2 + 8 / 5.0 + 10 / 3
.
Therefore expression (o) can be ignored or skipped.
(Thanks to Katlyn Edwards, TA at University of Washington)
String middle = "T.";
(
parenthesis should be a {
curly brace. It should be:
e. public static void example(int x, int y) {
String middle = "T.";
String
class's replace
method, which is not discussed in the chapter.
Therefore the problem may be confusing or unsolvable to many students.
We suggest skipping parts (i) - (k) of this problem, or referring students to this Java API documentation on the String
replace
method.
(Thanks to Alan Broder of Yeshiva University)
return false;
""
) is passed."
But this text does not make sense for this problem, because the method accepts an int
parameter, not a string.
This text should be disregarded.
(thanks to Richie Sweeney)
cointCoins
but it should be countCoins
.
double prize = PRIZE * Math.pow(2, matches.size());(Thanks to Chris Middleton of Boston University)
explore
method, there is a missing right curly brace just before the line that says "return false".
The complete code sample should be:
private static boolean explore(Board b, int col) { if (col > b.size()) { return true; } else { for (int row = 1; row <= b.size(); row++) { if (b.isSafe(row, col)) { b.place(row, col); if (explore(b, col + 1)) { return true; } b.remove(row, col); } } return false; } }(Thanks to Cheng Xing)
for
loop." It should say, "with a while
loop."
(Thanks to Barbara Anthony)
"to"
."
It should say, ... "the top of the stack is "be"
.
(Thanks to Jeff Nyhoff of Calvin College)
map.put(15, "Daisy");
[0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] 12 29 30 39 40 55 64 70 84 91 99
[81, 42, 22, 17, 9, -3]
Have you found an error in our textbook? If so, please email us at: