Authors' official companion web site
(Thanks to UW student Kaydee Smith for the correction!)
(Thanks to Technical University of Denmark professor, Jørgen Villadsen)
(Thanks to UW student Melanie Drake for the correction!)
main
method is executed in turn, from first to last.
(Thanks to UW student Kaydee Smith for the correction!)
(Thanks to UW postdoc Wolfgang Gatterbauer for the correction!)
args
is missing from the header to the main
method. Appendix A on page 784 should also be corrected to match.
(Thanks to UW student Dan Quoc Hoang for the correction!)
System.out println
should be System.out.println
.
207 / 10
is 20.7
on a calculator, so 207 / 10
evaluates to 20
(Thanks to UW student Nicole Scharping for the correction!)
12 / 7 * 4.4 * 2 / 4
and 4.0 / 2 * 9 / 2
mistakenly occur twice. Appendix A on page 788 should also be corrected to match.
(Thanks to UW student Raevynn Leach for the correction!)
str2.toLowerCase().substring(9, 13) + str3.substring(18, str3.length() - 7)
(Thanks to CSU Stanislaus student Kristi Davis for the correction!)
Hello there. 1+2 is 3 and 1.5 squared is 2.25!
In the printed textbook, there are spaces between 1 + 2
which changes the correct answer in terms of the number and type of tokens.
(Thanks to University of Victoria student Gordon Celesta for the correction!)
100 * 5
should be written as 100*5
(without spaces around the *
). Also, the input 600,000 does not lead to an exception as falsely noted in the answer key on p794.
(Thanks to University of Victoria student Gordon Celesta for the correction!)
(Thanks to UW student Brandon Dilbeck for the correction!)
System.out.printf
call should be the following:
System.out.printf("%.2f%10.1f\n", angle, angle);
(Thanks to UW student David Li for the correction!)
printFractionSum
should go from i = 0 to n-1, not from i = 1 to n.
(Thanks to Shoreline CC student Nick Escalona for the correction!)
printFactors
method call should be the following:
1 and 2 and 3 and 4 and 6 and 8 and 12 and 24
(Thanks to UW student Steven Pell for the correction!)
printTriangleType
method does not very clearly specify what should happen if the method is passed invalid values, such as ones where one side length is longer than the sum of the other two (which is impossible in a triangle). In particular the last call shown to the method, which passes 2, 18, and 2 as the side lengths, is not a valid triangle.
The problem should either assume that this case is not possible (a precondition) or it should test for this and throw an IllegalArgumentException
when passed invalid values. We leave it to the reader (or the instructor who has assigned the problem) how to appropriately handle this case.
(Thanks to Shoreline CC student John Leonard for the clarification!)
(Thanks to UW student David Nufer for the correction!)
Most of the algorithms we have seen so for have involved sequential access.should be,
Most of the algorithms we have seen so far have involved sequential access.
(Thanks to UW student Alvaro Velez de Villa for the correction!)
Tally
program line 11, the keywords new int
should be colored brown.
(Thanks to Technical University of Denmark professor, Jørgen Villadsen)
The only change you would would have to make would be to allocate a larger array:should be,
The only change you would have to make would be to allocate a larger array:
(Thanks to UW student Liz Moffat for the correction!)
For example, in the program Temperature2 had an array...should be,
For example, the program Temperature2 had an array...
(Thanks to UW student German Kutsy for the correction!)
PascalsTriangle
program line 16, the keyword int
should be colored brown.
(Thanks to Technical University of Denmark professor, Jørgen Villadsen)
You might not specify every detail about the car,such as the fact that it should have four wheels and headlights,but you do specify some initial attributes that are important you.should be,
You might not specify every detail about the car,such as the fact that it should have four wheels and headlights,but you do specify some initial attributes that are important to you.
(Thanks to UW student Joseph Dunaravich for the correction!)
1: How many shares, at what price per share? 15 16.55
(Thanks to UW student Chun Yu Lai for the correction!)
getPoint
method should be Point
, not int
.money
will store the value 600000
."
(Thanks to University of Victoria student Gordon Celesta for the correction!)
System.out.println(1000000 + i + "\t" + count[i]);
(Thanks to UW student Nancy Do for the correction!)
System.out.println("element [" + i + "] is " + data[i]);
(Thanks to UW student Nancy Do for the correction!)
new
. The line should read:
SUV s = new SUV();
(Thanks to UW student Ashlimarie Dong for the correction!)
(Thanks to UW student Matt Kipps for the correction!)
(Thanks to UW student Noa Piper for the correction!)
(Thanks to Technical University of Denmark professor, Jørgen Villadsen)
Have you found an error in our textbook? If so, please email us at: