Java Gently 3rd Edition

Error List No 2 13 March 2001
 
 

Stream adaptation

There are still a few residual errors relatied to the transformation from Text to Stream. These are at:
p139 -8 p148 line 11 Stream.Read
p145 line -13 and p143 line -10 becomes fin.Stream()
p581 line 1 Stream.format

Time class

used to be called Times and there are some occurrences of this on page 98 in Figure 3.7.
Also in example 4.2, on p121 line -14 remove the second variable, i.e.  , newTime

Minor mistakes - sorry

p151 line14 = d.getInt not getMax
p111 line 13 This is not Pascal’s triangle
p58 line 4 Math.pow(x, 1/3);
p340 getDateInstance(DateFormat.FULL).format(new Date())
p552 lines 12 and 18 = new URL
 

Rainfall program Example 3.4

p72 lines -6 to -16 12 histograms labels 1 to 12
p73 line -10 to -8
// Display a bar for each month and then the final axis
for (int month = 1; month <=12; month ++) {
bar (month, Math.random()*40);
The program on the web is correct.

Tokenizers

p270 line -4 Another token should start after the space in " "
p270 line -1 omit the space in the set
p271 line 3 add a space before the s

Calendar class

p289 line -12 append
if c is a Calendar object then
p289 line -11 and -10 replace c.get and c.set

Search sequence

p241 lines 5, 6, 7 become
}
return false;
 

J M Bishop
13 March 2001