The following are corrections in 'The class of JAVA' book.
Page 11, exercise 2
(e) Java output generated by Java compiler is
should be replaced with
(e) The output generated by Java compiler is
Page 17, first line below the figure 2.1
codejavadoc -d ../docs Hello.java
should be replaced with
javadoc -d ../docs Hello.java
Page 17, first line after the first paragraph.
codejavadoc -d ../docs -package Hello.java
should be replaced with
javadoc -d ../docs -package Hello.java
Page 34, lessons learned last bullet point, last line
by using \following
should be replaced with
by using following
Page 34, exercise 1
(m) \0905 is a valid identifier in Java (\0905 is a letter in the ...
should be replaced with
(m) \u0905 is a valid identifier in Java (\u0905 is a letter in the ...
Page 37, Listing 4.1, line 6
System.out.println("i = "+i+", j = "_j);
should be replaced with
System.out.println("i = "+i+", j = "+j);
Page 87, lessons learned
An interface can have any non-abstract methods,...
should be replaced with
An interface cannot have any non-abstract methods,...
Page 120, third last line
If the returned value is positive then x is considered to precede y.
should be replaced with
If the returned value is negative then x is considered to precede y.
Page 121, Listing 10.3 line 5
public class NameComparator<Account> implements Comparator<Account>
should be replaced with
public class NameComparator implements Comparator<Account>
Page 123, line 3
The String class implements Comparabe interface
should be replaced with
The String class implements Comparable interface
Page 130, in last three lines
In Line 7, the balance would be 15000, now Line 9 makes ac in the method refer to
a new Object, so the Object refered by ac in Line 1 is unaffected. Line 9 would make the
method loose the reference to the object which was passed as a parameter in Line 4.
should be replaced with
In Line 3 of the method, the balance would be 15000, now Line 5 in method makes ac refer to
a new Object, so the Object refered by ac in Line 1 is unaffected. Line 5 in method would make the
method loose the reference to the object which was passed as a parameter in Line 4.
Page 143, in listing before Section 11.4, line 1
public class Car extednds Vehicls {
should be replaced with
public class Car extends Vehicle {
Page 163, Listing 12.7 line 61
for (transactionIndex = 0; transactionIndex < nextTransactionIndexInPassbook; transactionIndex++)
should be replaced with
for (transactionIndex = 0; transactionIndex < nextIndexInPassbook; transactionIndex++)
Page 168, Listing 12.10 line 16
private (int maxDays)
should be replaced with
private Month(int maxDays)
Page 168, Listing 12.10 line 27
(this.ordinal() >= to.ordinal()));
should be replaced with
(this.ordinal() >= from.ordinal()));
Page 186, Listing 13.14 line 3
public Object setValue()
should be replaced with
public Object setValue(Object o)
Page 187, in code snipped listing line 1.
DateFormat dateFormat = new DateFormat("dd-MMM-yyyy");
should be replaced with
DateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy");
Page 193, Listing 13.20 line 3
public boolena hasNext();
should be replaced with
public boolean hasNext();
Page 220, Listing 14.4 Line 6 and 7
long m1 = d1.lastModified();
long m2 = d2.lastModified();
should be replaced with
long m1 = d1.getTime();
long m2 = d2.getTime();
Page 227, Listing 14.4, line 6
public void mark(itn readlimit)
should be replaced with
public void mark(int readlimit)
Page 241, BufferedOutputStream paragraph, 2nd line
Filter- OutputStream
should be replaced with
FilterOutputStream
Page 267, Section 15.1.1.3, 2nd paragraph, line 7,
10101000 0101000 00000001 ...
should be replaced with
10101000 0101100 00000001 ...
Page 270, 7th line after listing 15.1
byte[] ipaddress = byte[]202,153,27,54;
should be replaced with
byte[] ipaddress = new byte[]{202,153,27,54};
Page 318, Listing 17.7 title
Listing 17.7.Hello world using getGraphcis()
should be replaced with
Listing 17.7.Hello world using getGraphics()
Page 336, Listing 18.14, line 1
public MenuBAr()
should be replaced with
public MenuBar()
Readers can send comments and corrections to pravin@classofjava.com
Thanks
Pravin
Page 11, exercise 2
(e) Java output generated by Java compiler is
should be replaced with
(e) The output generated by Java compiler is
Page 17, first line below the figure 2.1
codejavadoc -d ../docs Hello.java
should be replaced with
javadoc -d ../docs Hello.java
Page 17, first line after the first paragraph.
codejavadoc -d ../docs -package Hello.java
should be replaced with
javadoc -d ../docs -package Hello.java
Page 34, lessons learned last bullet point, last line
by using \following
should be replaced with
by using following
Page 34, exercise 1
(m) \0905 is a valid identifier in Java (\0905 is a letter in the ...
should be replaced with
(m) \u0905 is a valid identifier in Java (\u0905 is a letter in the ...
Page 37, Listing 4.1, line 6
System.out.println("i = "+i+", j = "_j);
should be replaced with
System.out.println("i = "+i+", j = "+j);
Page 87, lessons learned
An interface can have any non-abstract methods,...
should be replaced with
An interface cannot have any non-abstract methods,...
Page 120, third last line
If the returned value is positive then x is considered to precede y.
should be replaced with
If the returned value is negative then x is considered to precede y.
Page 121, Listing 10.3 line 5
public class NameComparator<Account> implements Comparator<Account>
should be replaced with
public class NameComparator implements Comparator<Account>
Page 123, line 3
The String class implements Comparabe interface
should be replaced with
The String class implements Comparable interface
Page 130, in last three lines
In Line 7, the balance would be 15000, now Line 9 makes ac in the method refer to
a new Object, so the Object refered by ac in Line 1 is unaffected. Line 9 would make the
method loose the reference to the object which was passed as a parameter in Line 4.
should be replaced with
In Line 3 of the method, the balance would be 15000, now Line 5 in method makes ac refer to
a new Object, so the Object refered by ac in Line 1 is unaffected. Line 5 in method would make the
method loose the reference to the object which was passed as a parameter in Line 4.
Page 143, in listing before Section 11.4, line 1
public class Car extednds Vehicls {
should be replaced with
public class Car extends Vehicle {
Page 163, Listing 12.7 line 61
for (transactionIndex = 0; transactionIndex < nextTransactionIndexInPassbook; transactionIndex++)
should be replaced with
for (transactionIndex = 0; transactionIndex < nextIndexInPassbook; transactionIndex++)
Page 168, Listing 12.10 line 16
private (int maxDays)
should be replaced with
private Month(int maxDays)
Page 168, Listing 12.10 line 27
(this.ordinal() >= to.ordinal()));
should be replaced with
(this.ordinal() >= from.ordinal()));
Page 186, Listing 13.14 line 3
public Object setValue()
should be replaced with
public Object setValue(Object o)
Page 187, in code snipped listing line 1.
DateFormat dateFormat = new DateFormat("dd-MMM-yyyy");
should be replaced with
DateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy");
Page 193, Listing 13.20 line 3
public boolena hasNext();
should be replaced with
public boolean hasNext();
Page 220, Listing 14.4 Line 6 and 7
long m1 = d1.lastModified();
long m2 = d2.lastModified();
should be replaced with
long m1 = d1.getTime();
long m2 = d2.getTime();
Page 227, Listing 14.4, line 6
public void mark(itn readlimit)
should be replaced with
public void mark(int readlimit)
Page 241, BufferedOutputStream paragraph, 2nd line
Filter- OutputStream
should be replaced with
FilterOutputStream
Page 267, Section 15.1.1.3, 2nd paragraph, line 7,
10101000 0101000 00000001 ...
should be replaced with
10101000 0101100 00000001 ...
Page 270, 7th line after listing 15.1
byte[] ipaddress = byte[]202,153,27,54;
should be replaced with
byte[] ipaddress = new byte[]{202,153,27,54};
Page 318, Listing 17.7 title
Listing 17.7.Hello world using getGraphcis()
should be replaced with
Listing 17.7.Hello world using getGraphics()
Page 336, Listing 18.14, line 1
public MenuBAr()
should be replaced with
public MenuBar()
Readers can send comments and corrections to pravin@classofjava.com
Thanks
Pravin