Combined Errata
Page 8
table 1.4 - Double should read "64 bits" not "16 bits."
Table 1.4 : Double Size should read 64 bits
Page 73
Delete the line "private class Horse".
Last declaration on the page. "default Button ... //idefaulti should read "default Button ... //idefault" - idefaulti isn't a keyword i's are supposed to be quotes.
Page 102
In code, see detailed description
int i = 12;
byte b = I
should read:
byte b = i; Page 103
see detailed description
code sample at bottom of the page:
code row 6: System.out.println(
and
code row 8: System.out.println(<<<< ...
Change line 6 to System.out.println(">=");
Change line 8 to System.out.println("<"); Page 118
The code block at the center of the page,
the line:
3. System.out.println(int ...
should be
3. System.out.println("int version");
the line:
6. System.out.println(String ...
should be
6. System.out.println("String version"); Page 125
Bottom of the page
should read..
3. System.out.println("five times");
not
3. System.out.println(ifive timesi); Bottom of the page
should read...
4. System.out.println("once");
not
4. System.out.println(ioncei); Page 127
first code see detailed description
first code should read ...
2. System.out.println("value is " + x);
not
2. System.out.println(ivalue is i + x); second code
should read ...
2. System.out.println("value is " + x);
not
2. System.out.println(ivalue is i + x); third code
should read ...
2. System.out.println("value is " + x);
not
2. System.out.println(ivalue is i + x); Page 134
Lines 6 and 7 in code example: es " + (y/x)); at the end of line 6 should be deleted.
Page 137
"The throw statement" paragraph, the code sample says:
throw new IOException( ...
but it should be:
throw new IOException("File not found"); Page 138
the second line from the bottom, the code part says:
java. lang.Error
but it should be:
java.lang.Error Page 149
second question states:
"Consider the following code. Assume that i and j have been declared as ints and initialized."
this statement should be:
"Consider the following code." because the declaration and initialization of the i and j ints is in the code following the statement. Page 151
the first code part:
4. System.out.println(value ....
should be:
4. System.out.println("value is two");
6. System.out.println(value ....
should be:
6. System.out.println("value is three");
9. System.out.println(value ....
should be:
9. System.out.println("value is " + j); Page 157
- CH 5 answer 10
last 2 lines should read "If the args array does not have exactly zero arguments, an AssertionError will be thrown." Page 165
the sample code block, line 14 says:
14. printRJ("" + ", w);
but it should be:
14. printRJ("" + i, w); Page 212
Real World Scenario: Order of Notification Starting from the Fourth paragraph, first sentence (“The solution appears on the CD-ROM in the file NotifyLab.java.) going forward should be deleted.
Page 230
name of method sin forgotten, and delete the open quote (4th line from bottom)
Page 281
Please delete the following code segment from the mock up readme example on this page:
“converter.jar - a tool that takes the flat file record format given in the Exam and converts it to a file the server code can read. Run this application with the following command-line invocation:
$ java - jar converter.jar records.txt” Page 356
Second sentence, first line, “Note especially the lines in bold type?” should read “Note especially the lines in underlined type” instead.
Page 407
Code thread, seventh line starting with . should be deleted and code line should begin with “java UseShareThread?”
Page FAQ
NotifyLab.java
References to "Solutions" on the CD-ROM in a file entitled NotifyLab.java. These references should and will be deleted. The solution referenced here was included in a previous edition and no longer available for this edition. (I've indicated on particular page number below, but I'm not sure where other references may be hiding.)
NotifyLab.java See Detailed Description
In many cases, throughout the book quotes appear as í and not as quotes. This was a production error and will be corrected in further editions.
Page xxxiv
The answer to Question #28 should be "A". The explanation should read "In Java, arguments are always passed by value"
Answer to question 30 - Delete "which is always less than (or equal to) its single argument"
|