Errata

To err is author, to forgive reader.

 
 

You can report an erratum in Harnessing Java 7 (Vol. 1, 2, and 3) by posting a comment on this page or by sending an email to ksharan@jdojo.com. Please include the details of the erratum such as Volume #, Page #, Paragraph #, etc.

 

Printed Version

If you have purchased the printed version of the book after March 30, 2012, there are no errata for you to apply. If you have purchased the book before this date, you will need to apply errata.

 

Google and Kindle Versions

If you have purchased Google or Kindle eBooks, you do not need to worry about applying the errata. Google eBooks will be updated automatically in your library. You can synchronize your Kindle eBooks by downloading the latest version from Amazon. If you re-download a Kindle eBook, the customizations in your local copy, for example, highlights, notes, etc. will be lost.

 

 

Downloads


22 Comments on “Errata”

  1. Anonymous says:

    Vol 1
    Ch 6
    P 190
    If should be !! Instead of &&

    • Kishori says:

      Thank you “Anonymous” for reporting this erratum. I will include it in the list of errata. The corrected if-statement on page 190 (Harnessing Java 7 – Volume 1) should read as follows.

      if (stanzaNumber < 1 || stanzaNumber > 2) {
      System.out.println(“Cannot print stanza #” + stanzaNumber);
      return; // end the method call
      }

      Thanks
      Kishori

  2. Anonymous says:

    Vol 1
    Page 185
    Static rule import 1
    Sentence 1
    It looks like the explanation of which import is used mixes the two types together.

    • Kishori says:

      I have rephrased the ending part of the sentence to make it read a little better.

      Original:
      If two static members with the same simple name are imported – one using single-static-import declaration and other using static-import-on-demand declaration, the one imported using single-import-on-demand declaration takes precedence.

      Modified:
      If two static members with the same simple name are imported – one using single-static-import declaration and other using static-import-on-demand declaration, the one imported using single-import-on-demand declaration is used to resolve the simple name.

      Thanks
      Kishori

      • Anonymous says:

        I didn’t really have a problem with original phrasing. It may just be me, but the term that tripped me up was “single-import-on-demand”. The two options were: ”single-static-import” and “static-import-on-demand”. The correct answer was indicated as being “single-import-on-demand” which to me sounded like a mixture of the two choices.

        • Kishori says:

          Thanks for the clarification. Now, I get your point. The phrase “single-import-on-demand” has been used instead of “single-static-import”. Sorry for the confusion. It is an error. I will include it in the list of errata.

          Original:
          If two static members with the same simple name are imported – one using single-static-import declaration and other using static-import-on-demand declaration, the one imported using single-import-on-demand declaration takes precedence.

          Modified:
          If two static members with the same simple name are imported – one using single-static-import declaration and other using static-import-on-demand declaration, the one imported using single-static-import declaration takes precedence.

          Thanks
          Kishori

  3. Brian says:

    Kishori,
    I have been enjoying your book very much.
    It looks like there is an error in vol 1 on page 70. The second reference to the number of bits used for storage for a double says 32 bits instead of 64 bits.

    • Kishori says:

      Thanks Brian for taking your time to report this. I have verified it. It is an erratum and I am the one who is responsible for it. I will include it in the list of errata.

      Thanks
      Kishori

  4. Brian says:

    Vol. 1 – Page 221
    Original:
    “When the method call was over, the formal paremeters, u and v, were discarded.”
    Modified:
    “When the method call was over, the formal paremeters, x and y, were discarded.”

  5. Brian says:

    Vol 1 – Page 250
    The comment says you are casting the variable “x” but the code casts variable “xyz”.
    // Test class name is used to cast the reference variable x
    Test t2 = (Test) xyz;

    • Kishori says:

      Thanks Brian for your sincere efforts for reporting this mistake.
      I tend to write lots of comments to make sure readers do not get lost at any point. The downside of referencing code details in comments is that they need to be in sync. This is what happened in this case. I failed to keep them in sync.

      Thanks
      Kishori

  6. Brian says:

    Vol 1 – Page 252
    There are four places on the page where the package name is “com.jdjo.chapter3.p1” instead of “com.jdojo.chapter6.p1”. Note that both “chapter3” should be changed to “chapter6” and “jdjo” should be changed to “jdojo”.

    • Kishori says:

      Thanks Brian for catching this error. The typo “jdjo” made this error stay in this chapter for a long time. This chapter used to be chapter3. When I did the global search for com.jdojo.chapter3, these instances were not found.

      I will include them in the list of errata and fix them in a couple of days.

      Thanks
      Kishori

  7. Brian says:

    Vol 1 – Page 260
    Original:
    “You get a compiler error if you attempt to compile the above definition of the Test class,”
    Modified:
    “You get a compiler error if you attempt to compile the above definition of the Test2 class,”

    • Kishori says:

      Once again, I would like to thank you for all your efforts and time for reporting these errors. I will include them in the list of errata.

      Thanks
      Kishori

  8. Brian says:

    Kishori, I don’t know if you want minor details reported, but I came across a few items which I don’t believe you meant to say and are a little disruptive while reading.

    Vol 1 – Page 296
    The first sentence under “Finalizing an Object” – Instead of “hold onto those resources until the object is alive” did you mean to say “hold onto those resources WHILE the object is alive”?

    Vol 1 – Page 322
    Under “Exception Classes in Java” – The sentence “Figure 9-2 shows a few classes exception classes.” doesn’t sound right.

    • Kishori says:

      Brian,
      Thank you so much for reporting these errors. I understand that it is disruptive when you see a mispelled word or a grammatical mistake while reading a book. I admit that, despite my sincere efforts, some errata are still lurking in the book. I am sorry about that.

      I have included these errors in the list of errata.

      If you don’t mind, please report everything that you think is an error. You might want to note down all errors in a chapter that you find in a text file and send it to me at ksharan@jdojo.com and I will fix them at one time.

      Thanks
      Kishori

  9. Anonymous says:

    Vol – 2, Chapter 12: Collections

    SortedSet

    “What would happen if the class of the elements of a SortedSet does not implement the Comparable interface and neither do you supply a Comparator object? The answer is that, in such cases, you cannot add more than one element to a SortedSet.”

    This is wrong. You can not add even a single element to TreeSet if the element does not implement Comparable interface and neither Comparator object has been passed.

    • Kishori says:

      Thanks for reporting this. This rule was valid until Java 6. The Collection designers thought that one element in a TreeSet is always trivially sorted, so why to even check if the first element can be compared with other elements. Java 7 changed this rule what you have described. I failed to update this for Java 7. A couple of months ago, I had updated this (removed the quoted text) for the book “Beginning Java 8: Language Features”, which will be published in the first week of August 2014. Once again, thanks for taking your time to point this out.

      Thanks
      Kishori

  10. Book “Java 9 Revealed” For Early Adoption and Migration

    Chapter 7, “Creating Custom Runtime Images”
    Table 7-1
    –launcher =
    Description

    “The tool will create a scrip/batch file named..”

    I think it is simple misprint the word “script”.
    It would be:
    “The tool will create a script/batch file named..”.

    • Kishori says:

      Thank you Anatolii for reporting this. This is a typo and I will fix it in the next release.

      Thanks
      Kishori


Leave a Reply

Your email address will not be published.