First Edition &ndash Updates and Revisions

No work is without error and this tome is no exception. The following is a list of errata currently known. If you find any others, please do send Russel Winder an email with details of the error. Thanks.

p.9 Last sentence, d missing after n, it should read "... dowloaded and executed very easily.".

p.44, line 24. Delete s after Square: "However, Square can also be used ...".

p46. line 3 "... implementations all ..." should be "...implementations for all...".

p.53, second block of code: last statement currently reads:

      t2.f(s) ;
    

but should read:

      t2.f(aStack) ;
    

p.82. Line 19 insert the statement (to make sure the method removeFront decrements the count):

      count-- ;
    

p.83. Line 28 should read:

      System.out.println("Removed: " + n) ;
    

p.83. Line 33 should read:

      System.out.println("Removing from the queue has failed.") ;
    

p87. insert the word 'to' at the end of line 22 so that it reads "...want to travel...".

p.100. Last sentence of third paragraph (middle of page) line 19, insert comma between the two is words thereby reading "...,where the actual error is, is usually the...".

p108. line 20 add "as well as details of the balance of the account".

p109. line 11 add "as well as details of the balance of the account".

p115. line 28. "pubic" really should be "public" :-)

p.144. Section 11.6.2, Description, 3rd paragraph should read "An interface type is created...".

p.159. The first code fragment should read:

      int i = 1 ;
      double j = 10.4 ;
      i++ ; j-- ; // increment i, decrement j
      // here i == 2 and j == 9.4
    

p.225. The class is called StringCounter but the first line of the main function is:

      Class3 c3 = new Class3() ;
    

This inconsistency is wrong and can be fixed either by renaming the class Class3 or by replacing the above line with:

      StringCounter c3 = new StringCounter() ;
    

p.247. Comment above the method protected void g() needs a will inserted thereby reading "Method that will be inherited...".

p.365. In the removeElementAt method of the List class, line 14 should read:

      previous.next = toGo.next ;
    

p.390. Figure 19.1 is inconsistent with the code it purports to describe. The diagram describes a "head insert, tail remove" protocol for Queues implemented using a circular array. The code is "tail insert, head remove". A consistent diagram is obtained of the labels 'head' and 'tail' are swapped.

p.424. The second bullet point on this page just before Exercise 20.1 should read:

Lists are good at handling insertion at both the head and the tail, O(1). Also, it turns out that insertion at the head is easy, O(1). The problem is removal at the tail, which is O(n).

p.676 & p.692. The email field was not reinitialized in the getPerson method of the MailMerge application. Need to insert the line:

      email = "" ;
    

just before the line:

      address = "" ;
    

on both pages.

p.816. There is an index entry "Squar 544". This line should be deleted and the following line should read "Square 44, 544".