Home Mike Meyers, A+ Certification Guru

Book Errata

Java2 Passport Series: Exam 310-025

Errata

page 6, line 13

Typo

reads:

A source file has the file extension .java. (compiled source files …

should read:

A source file has the file extension .java (compiled source files …

correction:

remove unnecessary period after the word java

 

page 9 line 3

Comment/Query

reads:

The following statement notifies the Java compiler that if the current source file or package does not contain a definition for the DataInputStream type, it should search the java.io package.

should read:

The following statement instructs the Java compiler to look for the DataInputStream class  in the java.io package if its class definition cannot be found in the  source file.

correction

The original statement is awkward.

 

page 29, In the first "Travel Assistance" icon (at the top of the page)

Error

reads:

The line contains the words "Travel Assistance:" at the start of the line.

should read:

It should not contain the words "Travel Assistance:" at the start of the line.

correction

remove the words "Travel Assistance:" from the first line of the text in the block .

 

page 33, Table 1.6

Error

reads:

Range and Default Values for Primitive Data Types
the default value for a char type is shown as \0000.

should read:

Range and Default Values for Primitive Data Types
the default value for a char type should be
'\u0000'.

correction

Change the char type from \0000 to \u0000

 

page 38, code at the bottom of page, second last line

Error

reads:

int[][] arrayA = new int[2][];

should read:

int[][] arrayA = new int[3][];

correction

change the number '2' to a '3'

 

page 51, Question 3

Error

reads:

interface MyInterface extends Runnable {}

should read:

interface MyInterface extends MyClass {}

correction

change Runnable {} to MyClass{}

 

page 53, Question 10

Error

reads:

Which of the following are legal character literals? Select four.

should read:

Which of the following are legal character literals? Select three.

correction

Change Select four to Select three.

 

All of Chapter 2 & 3

Error

reads:

code indentations are only in increments of 1

should read:

should be in increments of 3 or 4.

correction

Change increments from 1 to 3 or 4.

 

page 62, line 3

Error/Typo

reads:

int [] foo = 5new int [5];

should read:

int [] foo = new int [5];

correction:

remove the '5' before 'new'

 

page 64, line 12

Error

reads:

This code assigns the value 19 to the array element at index 5 in the first array

should read:

This code assigns the value 19 to the array element at index 5 in the second array

correction:

replace 'first' with 'second' since the assignment is being made to testScores[1] and not testScores[0]

 

page 68, line 16

Error/Comment

reads:

thing marked with the private modifier. For example, an instance variablemarked as private can only be accessed by methods of the class, but no other

should read:

thing marked with the private modifier. For example, an instance variable marked as private can only be accessed by instance methods of the class, but no other

correction:

include the word 'instance' before 'methods'.

 

page 97, line 4

Error

reads:

public class Dog {

should read:

public class Dog extends Animal{

correction:

include 'extends Animal' after Dog

 

page 97, line 9

Error

reads:

In the case of abstract methods, you have no choice: you must override the method unless the parent class is also abstract.

should read:

In the case of abstract methods, you have no choice: you must override the method unless the subclass  is also abstract.

correction:

Change parent class to subclass.

 

page 97, line 16

Typo

reads:

a generic, abstract eat () method, so you will have to come up with your own. But

should read:

a generic,  eat () method, so you will have to come up with your own. But

correction:

remove the word 'abstract'  before 'eat'..

 

page 98, line 19

Typo

reads:

pblic class TestDog {

should read:

public class TestDog {

correction:

insert the letter 'u'

 

page 103, line 31

Error

reads:

if you create a Dog object (Dog d = new Dog ()), the JVM must build out

should read:

if you create a Dog object (Dog d = new Dog ()), the JVM must build

correction:

remove the word 'out' after 'build'.

 

page 108, line 27

Typo

reads:

Dog = new Dog ("Aiko");

should read:

Dog d = new Dog ("Aiko");

correction:

missing variable name d in declaration

 

page 153, In the Travel Assistance icon at the top of the page

Typo

reads:

Programming Language Guide by Joshua Block

should read:

Programming Language Guide by Joshua Bloch

correction:

change 'Block' to 'Bloch'

 

page 154, line 14

Typo

reads:

System.out.println ("The class of arr is " + d.getClass().getName());

should read:

System.out.println ("The class of d is " + d.getClass().getName());

correction:

replace 'arr' with 'd'

 

page 154, line 20

Typo

reads:

The class of arr is [[D

should read:

The class of arr is [D

correction:

remove one of  the square brackets from '[[D'.

 

page 157, line 20

Typo

reads:

The second append adds in the characters for "Java." The toString() method in

should read:

The second append adds in the characters for "Java". The toString() method in

correction:

move the period from inside "Java." to outside the quotes, "Java".

 

page 158, lines 19-20

Typo

reads:

returns false as strA contains the original characters "Hello" and strB contains the characters resulting from the trim() operation: "Hello."

should read:

returns false as strA contains the original characters "Hello " and strB contains the characters resulting from the trim() operation: "Hello".

correction:

add a space in between "Hello " and the trailing quotation mark as noted, and move the period from inside "Hello." to outside the quotes, "Hello".

 

page 184, line18

Typo

reads:

However, since trailing [sic] 0's have no effect on the value of the original number,

should read:

However, since trailing zeros have no effect on the value of the original number,

correction:

Change "trailing [sic] 0's to trailing zeros.

 

page 199, line 3

Typo

reads:

The automatic conversion of operands to String values by the + operator is often very weird and nonnutritive.

should read:

The automatic conversion of operands to String values by the + operator is often very weird and nonnutritive.

correction:

Change nonnutritive to non-intuitive.

 

page 209, line 18

Typo

reads:

The resulting value is (n)/2^se,  n divided by two  to the power  of s. For

should read:

The resulting value is (n)/2^s  i.e.,  n divided by two  to the power  of s. For

correction:

remove  'e' from the equation and insert  i.e., before n

 

page 209, line 37

Typo

reads:

At runtime, the result of reference equality operator == is true if the

should read:

At runtime, the result of the reference equality operator == is true if

correction:

remove  'the' from after 'true' and insert 'the' before 'reference'

 

page 210, line 2

Typo

reads:

For String concatenation, if one of the operand is the null reference,

should read:

For String concatenation, if one of the operands is the null reference,

correction:

insert 's' after 'operand' to form 'operands'

 

page 210, line 18

Typo

reads:

The boolean operators & and | always evaluate both operands. When

should read:

The boolean operators & and | always evaluate both operands. When the

correction:

insert "the" after "When"

 

page 210, line 22

Typo

reads:

the left operand is true, the right expression is evaluated. Likewise, the ||

should read:

the left operand is true, the right expression is evaluated. Likewise, the conditional-or  ||

correction:

insert "conditional-or" before "||"

  

page 211

Review Question number 2, Answer D

Correction

reads:

{ 1,4,12,16,29,36,49,81 }

should read:

{ 1,4,9,16,29,36,49,81 }

correction:

Replace the third element 12 with 9

  

page 225, Exam Tip

Typo

reads:

For is a Java keyword

should read:

for is a Java keyword

correction:

replace "For" with "for"

 

page 226, Exam Tip

Typo

reads:

Do and while are Java keywords

should read:

do and while are Java keywords

correction:

replace "Do" with "do"

 

page 229, Exam Tip

Typo

reads:

Break and continue are Java keywords. In spite of the fact that

should read:

break and continue are Java keywords. In spite of the fact that

correction:

replace "Break" with "break"

 

page 232, Exam Tip

Typo

reads:

Try, catch, finally, throw, and throws are Java keywords

should read:

try, catch, finally, throw, and throws are Java keywords

correction:

replace "Try" with "try"

 

page 234, line 25

Typo

reads:

1. Try, catch, and finally blocks can be empty, for example:

should read:

1. try, catch, and finally blocks can be empty, for example:

correction:

replace "Try" with "try"

 

page 234, line 30

Typo

reads:

2. Try is a mandatory part and cannot be omitted. Neither catch nor

should read:

2. try is a mandatory part and cannot be omitted. Neither catch nor

correction:

replace "Try" with "try"

 

page 235, line 12

Typo

reads:

4. Try-catch-finally clauses, if present, must be in that order. The follow-

should read:

4. try-catch-finally clauses, if present, must be in that order. The follow-

correction:

replace "Try" with "try"

 

page 243, lines 14, 16, 17, 19, 22

Typo

reads:

do/while

should read:

do-while

correction:

change of format, which isn't consistent with the rest of the section

 

page 245, line 16

Typo

reads:

C. third case, default, second case,

should read:

C. third case, default, second case

correction:

Delete final comma

 

page 246

Typo

reads:

a)  i=1 j=0
b)  i=1 j=0
c)  i=2 j=0
d)  i=1 j=0 j=1
e)  i=2 j=0 j=1
f)  i=1 j=0 j=1 j=3
    i=2 j=0 j=1 j=3

should read:

a)   i=1 j=0

b)   i=1 j=0

     i=2 j=0

c)   i=1 j=0 j=1

     i=2 j=0 j=1

d)   i=1 j=0 j=1 j=3
     i=2 j=0 j=1 j=3

correction:

Re-organize variants

 

page 250, Review Answers

Typo

reads:

4. correct answers: A D

should read:

4. correct answers: A D F

correction:

Add a F on to the end as one of the answers.

 

page 260

Typo ( DIAGRAM )

reads:

The line with an arrow pointing away from waitng state has a invaled label.

should read :

The line with an arrow pointing away from waitng state should read "Interrupted"

correction:

Change the labe to "Interrupted".

 

page 262, line 20

CODE EXAMPLE

reads:

class SelfishThreadDemo

should read:

public class SelfishThreadDemo

correction:

insert ‘public’ before ‘class’

  

page 270, line 20

Correction

reads:

Therefore, it goes on,

should read:

And so it goes on

correction:

Replace “Therefore, it” with “And so it”

  

page 271, line 1

Type

reads:

protected follow this statement

should read:

protected follows this statement

correction:

Replace follow with follows

 

page 274, line 20

Typo

reads:

within a synchronized() method context.

should read:

within a synchronized method context.

correction:

remove the parentheses for synchronized

 

page 274, line 5

Typo

reads:

take care of performing the processing the data

should read:

take care of processing the data

correction:

remove “performing the”

  

page 274, line 19

Correction

reads:

All three methods can only be called within a synchronized() method context.

should read:

These three methods can only be called within a synchronized context. An attempt to invoke any of these methods outside a synchronized context will result in an IllegalMonitorStateException to be thrown at runtime.

correction:

These three methods can only be called within a synchronized context. An attempt to invoke any of these methods outside a synchronized context will result in an IllegalMonitorStateException to be thrown at runtime.

  

page 275, line 4

( Paragraph following the Travel Advisory )

Correction

reads:

“Otherwise, it dies”

should read :

The sentaince should be removed.

correction:

remove the sentence “Otherwise, it dies”

 

page 283, line 26

Typo

reads:

wait(), notify(), and notifyAll() are instance methods on the

should read:

wait(), notify(), and notifyAll() are instance methods of the

correction:

replace "on" with "of"

 

page 285, line 10

Typo

reads:

notify()/ notifyAll() will make an arbitrarily selected thread run.

should read:

notify() or notifyAll() will make an arbitrarily selected thread run.

correction:

replace '/' with "or"

 

page 288, line 20

Correction

correction

Add at the end of the paragraph -

Note that a call to the yield() method may not always cause the current thread to stop running. If no threads are waiting, the current thread may simply continue to run exiting the main() method too soon. Hence the answer B is wrong.

should read:

take care of processing the data

correction:

remove “performing the”

  

page 298, last line

Revision

reads:

//30 columns

should read:

                                                                          //30 columns

correction:

This text wrapped from the previous line. Ti should be right justified to mke that clearer.

 

page 309, line 1

Typo

reads:

import java.

should reads:

The line should not be there.

correction:

This line should be removed

 

page 309, line 26

Error

reads:

f.setSize(300, 400);

f.setVisible(true);

should read:

setSize(300, 400);

setVisible(true);

correction:

Remove the f. from each line.

 

page 316, line 4

Revision

reads:

 only the top one showing

should read:

 only the last one showing

correction:

replace "top"  with "last"

   

page 316, line 25

Typo

reads:

container, it first adds it to its internal list on components and then passes the

should read:

container, it first adds it to its internal list of components and then passes the

correction:

replace "on"  with "of"

 

page 319, line 12

Typo/Comment

reads:

You set the Layout the same as any other Layout:

should read:

You set the Layout in the same way  as any other Layout:

correction:

Replace "the same as" with "in the same way as"

 

page 321, Section "LayoutManagers vs. Container  - 2nd paragraph  (line 17 ?)

Revision

reads:

 Layout managers go to the container to find out what there is to display and the order

should read:

 Layout managers get the information on what to display and the order from the container

correction:

wording

 

page 326, lines 15, 16

Typo

reads:

Color.darkgrey, Color.grey, Color.green, Color., Color.lightgrey, Color.magenta, Color.orange, Color.pink, Color.red,

should read:

Color.darkGray, Color.gray, Color.green, Color., Color.lightGray, Color.magenta, Color.orange, Color.pink, Color.red,

correction:

Incorrect spelling/capitalisation of "gray"

 

page 332, line 16

  Browser problem

reads:

class MyApplet extends Applet {

should read:

public class MyApplet extends Applet {

correction:

Netscape needs the word "public" added, even though this works in Internet Explorer.

 

page 334, line 3

Typo

reads:

Labels, TextFields, TextAreas, Labels, CheckBoxes

should read:

Labels, TextFields, TextAreas, Checkboxes

correction:

remove duplicate "Labels", and change case of 'B'  in CheckBoxes

 

page 345 last 3 lines

Revision

reads: 

System.out.println("ActionEvent");//do cool stuff

super.processActionEvent (e); //get the super stuff done

}

 should read:

super.processActionEvent (e);      //get the super stuff done

System.out.println("ActionEvent");//do cool stuff

}

correction:

Swap the two lines of code to avoid confusion.

 

page 347, Travel Advisory

Error

reads:

You cannnot combine event delegation with event enabling.

should read:

You cannot combine event delegation and event enabling with the original JDK1.0 target event model.

correction:

Change "with" to "and" and add "with the original JDK1.0 target event model."

 

page 359, line 7

Typo

reads:

this could involve alot alot of separate classes. It is also possible (although not

should read:

this could involve alot of separate classes. It is also possible (although not

correction:

remove duplicate "a lot"

 

page 361, line 19

Typo

reads:

+ intY + " at " + yTime + " it's been " + (myTime-lastTime) +

should read:

+ intY + " at " + myTime + " it's been " + (myTime-lastTime) +

correction:

insert 'm' in front of "yTime"

 

page 409-410

Typo

reads:

Individual objectives defined by Sun displayed in unbolded text.

should read :

Individual objectives defined by Sun displayed in bold text.

correction:

First sentence of each objective should be in bold to match rest of book.

 

page 445 question 4

Comment/Typo

reads:

4. Which of the following classes have at least the same functionality over the

collection classes as java.util.Iterator?

should read :

Of the options provided only option C is a class, the remainder are interfaces?

correction:

Change question text

from "Which of the following classes have"

to "Which of the following are classes that have"

 

Top of Page