Developers: Learn a New Programming Language or App Development with Deitel LiveLessons Videos!
Login  |  Register  |  Media Kit  |  Press  |  Contact Us  |   Twitter Become a Deitel Fan on Facebook  
Custom Search
AddThis Social Bookmark Button

Errata: Java How to Program, 4/e

We wish to thank our many readers who took the time to email us with errata. If you find errata not listed on this page, please email us at Remember to include the book title and edition.

Note: You can determine which printing you have by looking at the bottom of the back of the second physical page in the book (page iv, but it has no page number). Just above the ISBN number is a list of numbers. For the first printing of the book, the list appears as follows:

10 9 8 7 6 5 4 3 2 1

The last number in the list is the printing number. So the above list indicates printing 1 and the following list indicates printing 2:

10 9 8 7 6 5 4 3 2

Elevator Case Study

  • There is an error in the multithreaded implementation of the Elevator Case Study of Java How to Program, 4/e. In certain circumstances, this error will cause a person waiting for the elevator not to enter the elevator when it arrives to pick up the person. The Elevator Case Study exhibits this erroneous behavior only when running on J2SE 1.4 and newer. We have addressed this bug in Java How to Program, 5/e. The updated Elevator Case Study code for Java How to Program, 5/e is available in the examples for Java How to Program, Fifth Edition ( The previous version of J2SE (version 1.3) is available from Sun Microsystems at

Chapter 1

Chapter 3

  • page 138, 17 lines from the bottom of the page: "one object of classFloorButton requests one object of class Elevator" should be "two objects of classFloorButton request one object of class Elevator"
  • page 138, 13 lines from bottom of page: "one object of classFloorButton" should be "two objects of classFloorButton"
  • page 138, 8 lines from bottom of page: "diamond" should be "diamonds"

Chapter 4

  • page 154, Good Programming Practice 4.1: The character for PI should actually be the fraction 1/4. 

Chapter 5

  • page 208, lines 37 and 38 of Fig. 5.6: the string literals "\t" and "\n" should be in light blue color. 

Chapter 6

  • page 265, lines 14-20 of Fig. 6.9: The names and values WON, LOST, CONTINUE, 0, 1 and 2 should all be in light blue text.
  • page 267, line 110 of Fig. 6.9: The value 7 should be in light blue text.
  • page 268, line 145 of Fig. 6.9: The value "Roll again." should be in light blue text.
  • page 286, Testing and Debugging Tip 6.3: getCurrentTimeMillis should be currentTimeMillis.

Chapter 8

  • page 416, Fig. 8.15, Line 16: The arguments 49 and 88 should be 1949 and 1988, respectively.

Chapter 9

  • page 513-520, Section 9.23: We accidentally published the prepublication version of this section. The PDF provided here is a replacement for section 9.23 that will appear as part of the first reprint. We sincerely apologize for any inconvenience this may have caused. Click here to view the PDF of the proper Section 9.23.

Chapter 16

  • page 906, the sentence, "By default, all primitive type variables are transient." should read, "By default, all primitive type variables are serializable."

Safari Trial Subscriptuon

Java How to Program, 4/e Cover

ISBN: 0130341517
© 2002

Order now at

Download Code
Examples and
Other Premium
Content for
Registered Users

Login or Register to download this book's code examples and other premium content.

Update :: December 08, 2019