Print this page Share

Java Programming 24-Hour Trainer

ISBN: 978-0-470-88964-0
504 pages
February 2011
Java Programming 24-Hour Trainer (0470889640) cover image


A unique book-and-video package presented by Java guru Yakov Fain

As one of the most popular software languages for building Web applications, Java is often the first programming language developers learn. The latest version includes numerous updates that both novice and experienced developers need to know. With this invaluable book-and-video package, Java authority Yakov Fain fully covers Java?s new features as well as its language extensions, classes and class methods, and the Swing Application Framework. For each lesson that he discusses in the book, there is an accompanying instructional video to reinforce your learning experience.

Lessons include:

  • Introducing Java
  • Eclipse IDE
  • Object-Oriented Programming
  • Class Methods
  • Back to Java Basics
  • Packages, Interfaces, and Encapsulation
  • Programming with Abstract Classes and Interfaces
  • Introducing the Graphic User Interface
  • Event Handling in UI
  • Introduction to Java Applets
  • Developing a Tic-Tac-Toe Applet
  • Developing a Ping-Pong Game
  • Error Handling
  • Introduction to Collections
  • Introduction to Generics
  • Working with Streams
  • Java Serialization
  • Network Programming
  • Processing E-Mails with Java
  • Introduction to Multi-Threading
  • Digging Deeper into Concurrent Execution
  • Working with Databases Using JDBC
  • Swing with JTable
  • Annotations and Reflection
  • Remote Method Invocation
  • Java EE 6 Overview
  • Programming with Servlets
  • JavaServer Pages
  • Developing Web Applications with JSF
  • Introducing JMS and MOM
  • Introducing JNDI
  • Introduction to Enterprise JavaBeans
  • Introduction to the Java Persistence API
  • Working with RESTful Web Services
  • Introduction to Spring MVC Framework
  • Introduction to Hibernate Framework
  • Bringing JavaFX to the Mix
  • Java Technical Interviews

Note: As part of the print version of this title, video lessons are included on DVD. For e-book versions, video lessons can be accessed at wrox.com using a link provided in the interior of the e-book.


See More

Table of Contents


LESSON 1 Introducing Java.

LESSON 2 Eclipse IDE.

LESSON 3 Object-Oriented Programming.

LESSON 4 Class Methods.

LESSON 5 Back to Java Basics.

LESSON 6 Packages, Interfaces, and Encapsulation.

LESSON 7 Programming with Abstract Classes and Interfaces.

LESSON 8 Introducing the Graphic User Interface.

LESSON 9 Event Handling in UI.

LESSON 10 Introduction to Java Applets.

LESSON 11 Developing a Tic-Tac-Toe Applet.

LESSON 12 Developing a Ping-Pong Game.

LESSON 13 Error Handling.

LESSON 14 Introduction to Collections.

LESSON 15 Introduction to Generics.

LESSON 16 Working with Streams.

LESSON 17 Java Serialization.

LESSON 18 Network Programming.

LESSON 19 Processing E-Mails with Java.

LESSON 20 Introduction to Multi-Threading.

LESSON 21 Digging Deeper into Concurrent Execution.

LESSON 22 Working with Databases Using JDBC.

LESSON 23 Swing with JTable.

LESSON 24 Annotations and Reflection.

LESSON 25 Remote Method Invocation.

LESSON 26 Java EE 6 Overview.

LESSON 27 Programming with Servlets.

LESSON 28 JavaServer Pages.

LESSON 29 Developing Web Applications with JSF.

LESSON 30 Introducing JMS and MOM.

LESSON 31 Introducing JNDI.

LESSON 32 Introduction to Enterprise JavaBeans.

LESSON 33 Introduction to the Java Persistence API.

LESSON 34 Working with RESTful Web Services.

LESSON 35 Introduction to Spring MVC Framework.

LESSON 36 Introduction to Hibernate Framework.

LESSON 37 Bringing JavaFX to the Mix.

LESSON 38 Java Technical Interviews.

APPENDIX What's on the DVD?


See More

Author Information

Yakov Fain works as a software architect for Farata Systems, a company that provides consulting services in the field of development of enterprise applications. He has authored several technical books and many articles on software development. Sun Microsystems has nominated and awarded Mr. Fain with the title of Java Champion, which has been presented to only a hundred and fifty people in the world. He leads the Princeton Java Users Group. Yakov's Twitter id is @yfain.
See More



Download TitleSizeDownload
Lesson 1 Movie 93.48 MB Click to Download
ReadMe File
Updated 1/2/13
1.15 KB Click to Download
Full Code Download (Workshop DVD)
File includes Lessons 3-25 and 27-36. Please note: The author will maintain the updated version of the code and solutions to the exercises at http://code.google.com/p/practicaljava/.
16.75 MB Click to Download
Lesson3 3.64 KB Click to Download
Lesson4 6.90 KB Click to Download
Lesson5 5.87 KB Click to Download
Lesson6 14.22 KB Click to Download
Lesson7 7.72 KB Click to Download
Lesson8 7.69 KB Click to Download
Lesson9 6.63 KB Click to Download
Lesson10 2.53 KB Click to Download
Lesson11 8.64 KB Click to Download
Lesson12 18.04 KB Click to Download
Lesson13 2.99 KB Click to Download
Lesson14 5.49 KB Click to Download
Lesson15 9.06 KB Click to Download
Lesson16 10.30 KB Click to Download
Lesson17 5.33 KB Click to Download
Lesson18 119.03 KB Click to Download
Lesson19 7.31 KB Click to Download
Lesson20 11.60 KB Click to Download
Lesson21 10.72 KB Click to Download
Lesson22 7.27 KB Click to Download
Lesson23 12.09 KB Click to Download
Lesson24 11.00 KB Click to Download
Lesson25 9.23 KB Click to Download
Lesson27 10.13 KB Click to Download
Lesson28 5.19 KB Click to Download
Lesson29 7.74 KB Click to Download
Lesson30 7.15 KB Click to Download
Lesson31 9.75 KB Click to Download
Lesson32 10.86 KB Click to Download
Lesson33 5.97 KB Click to Download
Lesson35 2.28 MB Click to Download
Lesson36 6.62 KB Click to Download
Not an Eclipse project.
See More


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
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.
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..."
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)"
21 Error in Reference
"Listing 3-5 shows the class Tax"

"Listing 3-5" should read "Listing 3-3"
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"
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."
3 28 Error in Text
In Steps 3 and 4:

should be:
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."
4 39 Error in Step
In Step 8, replace TestCalc with TestTax
60 Typo
"instancef Serializable"

"instanceof Serializable"
70 Error in Code
In the middle of the page:

Currently reads: increasePay(30)

Should read: p.increasePay(30)
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

should be

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


with this one

85 Error in Code
Replace constr.x=0;
// y coordinate in the grid

with this:

// y coordinate in the grid
98 Error in Code
Currently reads: class MyWindowEventProcessor extends java.awt.WindowsAdapter

Should read: class MyWindowEventProcessor extends java.awt.event.WindowAdapter
126 Error in code
Replace "public in getKidRacketY (int xCoordinate){"
with: "public in getKidRacketY (){"
12 127 Error in Figure
Figure 12-2:

should read:
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)."
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);
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"
14 143 Error in Code

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

with this:

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.
180 Error in Text
Listing 17-5 should read:

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

instead of:

salary = readDouble();
id = readInt();
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.
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");

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

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

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

    Portfolio3 p = new Portfolio3("Portfolio data");
    synchronized (this){
        }catch (InterruptedException e){
    System.out.println( "The main method of TestThreadsWait is finished");
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.
Error in Source Code, Lesson 32
Error in the source code for Lesson 32:
Replace e.getStackTrace() with e.printStackTrace().
See More

Press Release

February 09, 2011
Java Programming 24-Hour Trainer

Author Yakov Fain shows readers how to handle errors with this sample video from Java Programming 24-Hour Trainer.

See More

Related Titles

Back to Top