The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".
The following errata were submitted by our customers and approved as valid errors by the author or editor.
Version |
Location |
Description |
Submitted By |
Date submitted |
Date corrected |
Printed |
Page index
There is no index entry for CLASSPATH. There should be in |
index entry for CLASSPATH that minimally refers to the pages that the
ClassLoader class' getSystemResource, getSystemResourceAsStream and
findSystemClass methods are on.
|
Anonymous |
|
|
Printed |
Page 43
line 1 |
array.length % hashCode()
should say
hashCode() % array.length
|
Anonymous |
|
|
Printed |
Page 71
The second paragraph should be replaced with the following text |
Some sets of objects are more complicated to reconstruct than an
instance of the above class and its RandomAccessFile object. In such
cases the information to reconstruct objects may be spread out over
multiple objects in the set. It is not possible to reliably do such
validations from an object's readObject method, because there is no
way to know that all of the objects needed for the validation have
already been deserialized.
The ObjectInputStream class has a mechanism for handling this
situation. Objects that need to perform mutli-object validations can
call the ObjectInputStream object's registerValidation. The
registerValidation method is passed an object that implements the
ObjectInputValidation interface and a numeric priority. Here is the
declaration of the ObjectInputValidation interface.
public interface ObjectInputValidation {
public void validateObject()
throws ObjectInvalidException;
}
After an ObjectInputStream object's readObject method reads a set of
objects, but before it returns, it calls the validateObject method of
all the objects passed to its registerValidation method. If any of
those validateObject methods are unable to properly reconstruct
something or detect an consistency of some sort, then they should
throw an ObjectInvalidException.
Note that the order in which the objects' validateObject method is
called is determined by the priority value that was passed into
registerValidation along with the ObjectInputValidation object. Higher
priorities are called before lower priorities. Withing the same
priority value, there is no specified order.
(This change might not be made until the a second edition becuase it would
upset the text flow across many pages.- production editor)
|
Anonymous |
|
|
Printed |
Page 96
code -1: |
getRuntime().exec("copy foo.ps lpt1:");
should be
getRuntime().xexec("copy foo.ps lpt1:");
to work on Windows 95.
|
Anonymous |
|
|
Printed |
Page 182
|
FileReader under Constrcutors - FileInputStream should read:
FileReader as the header for FileReader
|
Anonymous |
|
|
Printed |
Page 408
The Description paragraphs for getSystemResource and |
getSystemResourceAsStream conclude with a sentence that says:
The resource name can be any system resource.
Instead it should say:
This method finds a system resource by looking for a file with
the given name. It looks for the given file name relative to
the directories and zip file in the CLASSPATH specification. If
the argument to this method includes any directory names, they
should be separated from what follows them by a '/' character.
|
Anonymous |
|
|
Printed |
Page 423
and {427} Neither Double toString nor static toString(double) |
print 8 digits. It should say seven rather than eight digits. That
will be true for both Float and Double.
|
Anonymous |
|
|
Printed |
Page 483
The sentence that says |
It computes <theta> as the principle value of the arc tangent of
b/a, using the signs of both arguments to determine the quadrant
(and sign) of the return value.
should say:
It computes <theta> as the principle value of the arc tangent of
a/b, using the signs of both arguments to determine the quadrant
(and sign) of the return value. Note that some versions of Java
prior to 1.1 incorrectly computed Math.atan2 as the arc tangent
of b/a.
|
Anonymous |
|
|
Printed |
Page 659
under the "Instance Methods" heading, the heading "getName" should |
|
Anonymous |
|
|
Printed |
Page 692
under the heading "modPow", the method declaration should say |
"modPow" instead of "modInverse"
|
Anonymous |
|
|
Printed |
Page 783
line 1 should be |
|
Anonymous |
|
|
Printed |
Page 792
Figure 16-1 shows STringCharacterIterator as extending BreakIterator. |
It does not. It is a subclass of object.
|
Anonymous |
|
|
Printed |
Page 890
Description paragraph, line 2 (" class implements...") should be run up |
|
Anonymous |
|
|
Printed |
Page 918
the description under "getYear" has 1990 where it should have |
|
Anonymous |
|
|
Printed |
Page 946
"Locale" para. 5 is missing a period in the last line. |
|
Anonymous |
|
|
Printed |
Page 980
The description of the java.util.SimpleTimeZone class' |
setStartRule method includs an example which should be a call to
setStartRule instead of a call to setEndRule. The example should be:
setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 2*60*60*100)
|
Anonymous |
|
|
Printed |
Page 993
A method is missing from the description of the java.util.Vector |
class:
public final int lastIndexOf(Object elem, int index)
This method searches backward starting at the specified index of
this Vector object to find an occurrence of the given object.
Returns
If this method finds an occurrence of the object, it returns the
occurrence?s index. If this method does not find an occurrence of
the given object then it returns -1.
|
Anonymous |
|
|