by
If you find an error in the book, please check this list first to see if it is already known. If not, please mail us the relevant information, including page numbers. All errata will be fixed in the next possible printing.
The errata is categorized by the printing number of the book. You can tell which printing you have by looking at the bottom of the copyright page. The last line of that page indicates the printing number.
withReference r = rq.remove();
Reference r = q.remove();
The SocketOptions interface has been added for socket implementation developers to use for setting and getting socket options.
If the class has not been loaded yet, then this form causes the class to be loaded using the class loader of the calling method and initialized.Second, replace the third and fourth sentences in the fourth paragraph.
init should be set to true when an instance of the class being requested is being created or if that class's methods are to be invoked. init should be set to false if the class is being loaded simply to check its existence or to get its superclasses.with
init should be set to false to load a class without initialization. The initialization causes performance problems for some applications, such as class introspection tools, that simply want to load a class and use reflection without creating an instance or otherwise accessing the class.Third, add the following new fifth paragraph.
Because the second form of this method accepts an explicit loader parameter, you can use it instead of loader's public loadClass() method. This overload of forName() is often a better choice because loadClass() does not handle array class names.
In the 1.2 CHANGES section, add the following sentences to the end of the paragraph.
In Version 1.2, the first form of forName() always performs class initialization before returning the class when the class is first loaded. In Version 1.1, whether initialization is performed was unspecified.
The Collection interface represents a generic collection of objects.
List l = Arrays.asList(new String[] {"dog", "pig", "cat"});
set.add(new MyPoint((int)(rnd.nextInt(100)), (int)(rnd.nextInt(100))));
set.add(new MyPoint((int)(rnd.nextInt(100)), (int)(rnd.nextInt(100))));
size() > load_factor*capacity
withAttributes.put(string1, string2)
Also, delete the three linesAttributes.put(new Attributes.Name(string1), string2)
and add the following three to the end of the method:// Clearing the original also does not affect the clone. man.clear(); printAttributes(manCopy.getMainAttributes());// Manifest-Version: 1.0
// Clearing the original also does not affect the clone. man.clear(); printAttributes(manCopy.getMainAttributes());// Manifest-Version: 2.0
attr.put("Sealed", "true");
with
attr.put(new Attributes.Name("Sealed"), "true");
Note that some items on this list are implementation-specific and subject to change without notice.
TreeMap map = new TreeMap(Collections.reverseOrder());
map.put("pig", null);
map.put("cow", null);
map.put("dog", null);
map.put("cat", null);
System.out.println( map ); // {pig=null, dog=null, cow=null cat=null}
The ZipEntry class implements Cloneable and exports a public clone() method.
This page was updated: 1-Oct-2001