Developers: Learn a New Programming Language or App Development with Deitel LiveLessons Videos!
s
menu
menu
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, 3/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 deitel@deitel.com. Remember to include the book title and edition.


Chapter 2

  • p.38, Software Engineering Observation 2.1, last line: "indentifier" should be "identifier"

Chapter 3

  • P.94, Section 3.6
    Section head should read: Another Java Applet: Adding Floating-Point Numbers
  • P.98, after declaration of variables number1 and number2
    The sentence: "Because these are both instance variables, they are automatically initialized..." is incorrect. These variables are local variables in method init; therefore they are not initialized.
  • P.108,Self-Review Exercise 3.1 Questions are labelled as c, d, e, f, g, h, and i
    instead of a, b, c, d, e, f and g

    The answers (on page 109) are correctly labelled a through g and therefore do not match with the questions that seem to be lettered incorrectly.

Chapter 4

  • p. 128, last paragraph: "which when divided by 6 should yield 79.4" should be changed to "which when divided by 10 should yield 79.4"

Chapter 6

  • p. 227 to 228: The last sentence on the page (which continues on p. 228) reads, "We have used JTextFields and JButtons in prior examples." This is an incorrect statement. This is the first example that introduces these concepts.

Chapter 7

  • p. 274, 3rd paragraph, 1st line: Array s should be array n.

Chapter 8

  • p. 330, fifth paragraph: In the sentence "An important difference between constructors and other methods is that constructors are not allowed to specify a return data type (not event void)" the word "event" in the parentheses should be "even."
  • p. 355, first paragraph below Fig. 8.6: increment should be INCREMENT.
  • p. 374, 7th bullet in Summary: The last "the" should be deleted.
  • p. 379, Self-Review Exercise 8.1: The sub-lettering should start at a not d.

Chapter 9

  • P. 392, Fig. 9.4, Line 75: File name should be InheritanceTest.java.
  • P. 394, 4th paragraph: Where it says "... super( a, b )... explicitly invokes the Point constructor (defined at line 11) ..." Line 11 should be line 15.

Chapter 12

  • P.596, after the first code snippet, 4th line. "that in all methods an interface must be implemented" should be "that all methods in an interface must be implemented"

Chapter 13

  • P.666, add a new statement between lines 37 and 38
         frame.show(); 
    In Java 2, version 1.3, the internal frame will not display without this line. It did work as shown in the book in version 1.2.

Chapter 15

  • P.762, Line 110: replace notify() with notifyAll(). Otherwise, suspended threads will not necessarily resume correctly.

Chapter 16

  • Figure 16.5 source code on disk: The line

    app.show();
    should be added just before the closing right brace of main. It does appear correctly in the printed version of the code in the book.

Chapter 17

  • Figure 17.14 has a number of problems (some our fault and some as a result of bug fixes in the Java API that, in turn, broke parts of this program). First, between line 105 and 106, add

    mainDialog.setVisible( true );
    to cause the dialog to display.


    Second, between lines 321 and 322, add

    record.setAccount( accountNumber );
    record.setFirstName(values[ BankUI.FIRST ] );
    record.setLastName(values[ BankUI.LAST ] );
    record.setBalance(Double.parseDouble( values[ BankUI.BALANCE ]  ) );

    Without the preceding lines, the update functionality does not update the record.

    Finally, the program assumes that the user opens a file when they first click the New/Open File option. When returning from this dialog, the buttons for update record, delete record and new record are enabled even if the user does not open a file. If you attempt to use these capabilities, they will fail because there is no file open to manipulate. To fix this, we will need to change the method openFile to return a boolean indicating if the file was opened or not. Then, lines 72 through 91 must be adjusted to disable the Open button and enable the other buttons only if a file is opened. If a file is not opened, all the buttons should be left in their original states.

 

Deitel Dive-Into(R) Series Corporate Training

Discounts on SafariBooksOnline.com subscriptions

 
Java How to Program, 3/e Cover


ISBN: 0130125075
© 2000

Order now at
Amazon.com
Informit.com

Download Code
Examples and
Other Premium
Content for
Registered Users

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

foot
Update :: September 01, 2014