Wrox Home  
Search

Topic: Java

Java Programming 24-Hour Trainer (0470889640) cover image

Java Programming 24-Hour Trainer

Yakov Fain
ISBN: 978-0-470-88964-0
Paperback
504 pages
February 2011
View Most Recent Edition of This Title
This title is out-of-print and not currently available for purchase from this site.


Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
Note
At the time of the book writing the latest Java release was JDK 6 and all code samples accompanying the book were tested with JDK 6. For downloading the current version of JDK please Google "JDK download" and follow the installation instructions.

The author conducts Java training classes using this book as a course textbook. Refer to the wiki page (the Slides section) at http://code.google.com/p/practicaljava/, where you may find more up to date Java installation instructions.
01/07/2013
Lesson 1 Movie Not on CD
The Lesson 1 movie that was not on the CD in the first printing is available as a download.
3/30/11 1
9 Error in Text
Last sentence of 1st paragraph of Chapter 2:

Currently reads: "There several popular Java IDEs, such as Eclipse, NetBeans..."
Should be: "There are several popular Java IDEs, such as Eclipse, NetBeans..."
01/09/2014
3 17 Errors in Listing 3-1
Two methods in Listing 3-1 are missing parentheses after their names. It should read startEngine() and stopEngine().
3/31/11 1
20 Error in method
Replace "method (calcTax)" with "method (adjustForStudents)"
8/16/11
21 Error in Reference
"Listing 3-5 shows the class Tax"

"Listing 3-5" should read "Listing 3-3"
8/16/11
3 21 Error in Text
The sentence, "For instance, a variable declared inside a for loop will not be excessive outside the for loop even inside the same method."

should instead read:
"For instance, a variable declared inside a for loop will not be accessible outside the for loop even within the same method."

i.e. change "excessive" to "accessible"
8/18/11
21 Error in Text
Currently reads: "For instance, a variable declared inside a for loop will not be excessive outside the for loop even inside the same method."

Should read: "For instance, a variable declared inside a for loop will not be accessible outside the for loop even inside the same method."
01/09/2014
3 28 Error in Text
In Steps 3 and 4:
TestCalc

should be:
TestTax
3/31/11 1
34 Error in Text
Currently reads: "As with any other class method, a constructor of a subclass can override the constructor of a superclass."

Should read: "As opposed to regular class methods, a constructor of a subclass can not override the constructor of a superclass."
02/16/
4 39 Error in Step
In Step 8, replace TestCalc with TestTax
10/3/11
60 Typo
Replace:
"instancef Serializable"

with:
"instanceof Serializable"
8/22/11
70 Error in Code
In the middle of the page:

Currently reads: increasePay(30)

Should read: p.increasePay(30)
02/13/2012
7 73 Error in Code
There are 2 }} missing from the line above the paragraph that starts with the word Note.
3/31/11 1
7 74 Code Change
((Payable)p).increasePay(30)

should be
p.increasePay(30);

This is actually not an error and will work as is, but there's no need to cast p to Payable since it's declared as Payable anyway.
3/31/11 1
74 Error in Code
Replace the line

    ((Payable)p.increasePay(30);

with this one

     p.increasePay(30);
9/9/11
85 Error in Code
Replace constr.x=0;
// y coordinate in the grid
constr.y=0;

with this:

constr.gridx=0;
// y coordinate in the grid
constr.gridy=0;
4/10/2011
98 Error in Code
Currently reads: class MyWindowEventProcessor extends java.awt.WindowsAdapter

Should read: class MyWindowEventProcessor extends java.awt.event.WindowAdapter
2/13/2012
126 Error in code
Replace "public in getKidRacketY (int xCoordinate){"
with: "public in getKidRacketY (){"
9/9/11
12 127 Error in Figure
Figure 12-2:
(110,70)

should read:
(100,70)
10/19/11
13 135 Addition to Text
Replace this sentence:
"Subclasses of Exception are called checked exceptions and have to be handled in your code."

with this one:
"Subclasses of Exception are called checked exceptions and have to be handled in your code (this doesn't apply to RuntimeException and its descendents)."
10/3/11
140 Error in Code
Remove the rightmost plus sign in the following line:
quantity+" bikes of the model " + bikeModel +);

It should read:
quantity+" bikes of the model " + bikeModel);
9/9/11
144 Errors in Text
1. Replace "you can store only objects - only primitives are allowed"
with "you can store only objects - no primitives are allowed" AND 2. Replace "into he corresponding wrapper object"
with "into the corresponding wrapper object"
9/9/11
14 143 Error in Code
Customers[10]

should be:
Cusomer[10]
10/3/11
14 147 Error in Code
Replace "New Hashtable();"
with "new Hashtable();"
9/9/11
149 Error in Code
Replace the second occurrence of "while(enum.hasMoreElements())){"
with "while(enumKeys.hasMoreElements())){"
9/9/11
165 Error in Code
Page 165,Listing 16-2, replace this file.write(data[i]);

with this:

myFile.write(somedata[i]);
4/10/2011
16 169 Error in Code
Tax tax=new Tax(dependents, state, grossInc);

should be:
Tax tax=new Tax(grossInc, state, dependents);

Note change in order in parentheses.
4/19/11
180 Error in Text
Listing 17-5 should read:

salary= stream.readDouble();
id = stream.readInt();


instead of:

salary = readDouble();
id = readInt();
07/16/2012
191-193 Error in Code
There is a sample code to get the stock price quotes from Yahoo! This sample uses the stock symbol MOT, which used to represent Motorolla at the time of writing. Since the MOT stock symbol has been recently modified, use MSI or any other valid stock symbol.
04/01/2011
205 Error in Code
Corrected code for Listing 19-4 (Ch 19, page 205):

       final String EMAIL_USER_ADDRESS = "marylou@gmail.com";
       String password="mypassword";
       final String MAIL_POP_HOST = "pop.gmail.com";
    
       Properties properties = System.getProperties();
        Session session = Session.getDefaultInstance(properties);

        Store store = session.getStore("pop3s");
        store.connect(MAIL_POP_HOST, EMAIL_USER_ADDRESS, password);

        Folder folder = store.getFolder("INBOX");
        folder.open(Folder.READ_ONLY);

        Message[] messages = folder.getMessages();
        System.out.println("Messages: " + messages.length);

        for (Message message : messages) {
            // get message parts here
        }
4/27/2011
220 Error in Code
Chapter 20, Page 220

Reads:
public static void main(String args[]){
  ? 
 mn.start();
  ?
 p.start();
 
 synchronized (this) {
   try{
     wait(10000);   
   } catch (InterruptedException e){  ?}
 }
  System.out.println(?The main method of TestThreads3 is finished?);
}
Should read:
   TestThreadsWait(){
    MarketNews3 mn = new MarketNews3("Market News");
    mn.start();

    Portfolio3 p = new Portfolio3("Portfolio data");
    p.start();
    
    synchronized (this){
        try{
            wait(15000);
        }catch (InterruptedException e){
            e.printStackTrace();
        }    
    }
    
    System.out.println( "The main method of TestThreadsWait is finished");
  }
4/26/2011
33 384 Error in Step 6
The first sentence in step 6 should read:

Right-click on the Database Connections in the Data Source Explorer.
5/21/11
Error in Source Code, Lesson 32
Error in the source code for Lesson 32:
Replace e.getStackTrace() with e.printStackTrace().
8/16/11
Printer-Ready Version   Share This
With you wherever you go: pdf + ePub + kindle -- DRM-free