• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Errata for OCA Java SE 7 study guide

 
Author
Posts: 587
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are releasing an errata sheet for the OCA Java SE 7 study guide.

If anyone has any errata that they'd like to summit to make the released sheet, please send me a private message with the errata, or simply post here.

Thanks,
Robert
 
Greenhorn
Posts: 9
Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Robert & Edward,
Thank you greatly for bringing out the print version of your book soon.I bought it on Amazon.The book is greatly helping me to work toward my goal of sitting for the prog1 certf exam.
I liked the way the book is detailed and aligned to the objectives listed @ oracle site.

I have perused through your book once and following are the points I noted.

================================
Errata
================================
1) Pg. 63
First "for loop" mentioned in this page should start with m=0 not m=1 based on the output shown.

2) Pg. 65
a) Integer hookSizeList;
should be
Integer hookSizesList.

b) Need clarification on example:
ayList <Integer> hookSizesList = new ArrayList<Integer>();
What is "ayList"?

3) Pg. 99
In table listing the Java Operator Associations, no. 9 (Bitwise AND) association is not mentioned.

4) Pg. 116
mateyMessage = new StringBuilder("Shiver me Tim");
should be
mateyMessage = new StringBuilder("Shivers!");
for the output "Shivers! Bad Storm!" shown on Pg.117

5) Pg. 117
mateyMessage = new StringBuilder("Shiver me Tim");
should be
mateyMessage = new StringBuilder("Shiver me Timbers!");
for the output "Shiver me Timbers and Bricks!"

6) Pg. 119
output of Print "Shivers!" cannot be correct for the delete operation listed on stringbuilder
mateyMessage = new StringBuilder("Shiver me Tim");

7) Pg. 118
mateyMessage = new StringBuilder("Shiver me Tim");
should be
mateyMessage = new StringBuilder("Shiver me Timbers!");
for the output "Shiver me Timbers"

8) Pg. 191
"On the job" note: "…methods behave in a similar manor"
should be
"…methods behave in similar manner"

9) Pg. 213
2 min drill on "Create and Use Methods"
"A method can be a primitive or an object."
should be
"A method return type can be a primitive or an object."

10) Pg. 293
Certification Summary
2 lines just before the para beginning "Another major concept…" has the explanation of Protected and Default access modifiers interchanged.

11) Pg.326
Primitive Casting Table
a) "byte to char" and "short to char" are listed as "Safe Conversion" but should state "Explicit Cast" as compiler errors it out.
b) "char to short" is listed as "Explicit Cast Precision Lost" shouldn't it be just "Explicit Cast"?

12) Pg. 364
Example of ArrayIndexOutOfBoundsException
num[2][0] = (float)1.0; //line1
num[2][1] = (float)2.0; //line2
System.out.println(num[2][2]); //line3
System.out.println(num[2][3]); //line4 //ArrayIndexOutOfBoundsException

Lines 1,2 and 3 will also generate exception though only line4 is indicated.

13) Pg. 368
Exercise 9-5
System.out.println(counter); is missing the closing bracket and semicolon.


14) Pg. 381
Q.11 Answer B mentions "InterruptedException" in the explanation
should be "InterruptedIOException".

================================
Clarifications
================================
1) Pg. 189
Overloading a Method
"Overloaded methods must not all have the same return type."
The explanation following this line does not talk about return type but parameter list, need help.

2) Pg.382
Q.12 Option B is mentioned incorrect. However, isn't NullPointerException a type of RuntimeException and so also a correct answer with option A?



Thanks,
Ram


 
Robert James Liguori
Author
Posts: 587
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for this errata list.

We will go through them all and add them to the errata sheet.

-- Robert
 
Greenhorn
Posts: 3
Firefox Browser Postgres Database PHP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Robert Liguori wrote:We are releasing an errata sheet for the OCA Java SE 7 study guide.

If anyone has any errata that they'd like to summit to make the released sheet, please send me a private message with the errata, or simply post here.

Thanks,
Robert



Hello Robert,

Where did you release the sheet?

I'm translating this book into brazillian portuguese and I am needing this.

Thanks Bob
 
Robert James Liguori
Author
Posts: 587
6
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Roberto,

Here is the current draft version of our errata sheet:
http://gliesian.com/files/oca-errata-draft.doc

Note that there are a few mores items (errata) that are under review that we have not yet added to the sheet.

Once we finalize the errata sheet, we will forward it to the publisher where it will be posted officially, and if the book goes through an update cycle, the changes will be incorporated.

The main reason I've posted the draft errata sheet, is because you requested the information for the new book, so it'll give you an early look at what will change in the English version.

If anyone else reading this thread have encountered any additional errata not listed on the sheet, please let us know and we'll validate and roll the new errata into an updated version of the sheet.

Thanks,
Robert
 
Roberto Rezende de Assis
Greenhorn
Posts: 3
Firefox Browser Postgres Database PHP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Robert

Robert Liguori wrote:Roberto,

Here is the current draft version of our errata sheet:
http://gliesian.com/files/oca-errata-draft.doc

Note that there are a few mores items (errata) that are under review that we have not yet added to the sheet.

Once we finalize the errata sheet, we will forward it to the publisher where it will be posted officially, and if the book goes through an update cycle, the changes will be incorporated.

The main reason I've posted the draft errata sheet, is because you requested the information for the new book, so it'll give you an early look at what will change in the English version.

If anyone else reading this thread have encountered any additional errata not listed on the sheet, please let us know and we'll validate and roll the new errata into an updated version of the sheet.

Thanks,
Robert

 
Roberto Rezende de Assis
Greenhorn
Posts: 3
Firefox Browser Postgres Database PHP
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Robert

On page 147 there is these 2 lines



The c5 should be 98, not 121.

And I didn't understand from where the 131072 came from and what was its meaning.

Thanks

Roberto
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello

On page 70 the example should be declaring the totalDaysCamping variable as an int

should read


Thanks


 
Robert James Liguori
Author
Posts: 587
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Roberto,

The list has been updated:

Here is the current draft version of our errata sheet:
http://gliesian.com/files/oca-errata-draft.doc

Thanks,
Robert
 
Robert James Liguori
Author
Posts: 587
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JavaRanch is not allowing me to remove/replace the legacy link for the errata list...

The new errata list is here: http://mhprofessional.com/product.php?isbn=0071789421.

Just click on "Errata" under "Downloads" in the left side bar.

-- Robert
 
Robert James Liguori
Author
Posts: 587
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Robert Liguori wrote:JavaRanch is not allowing me to remove/replace the legacy link for the errata list...

The new errata list is here: http://mhprofessional.com/product.php?isbn=0071789421.

Just click on "Errata" under "Downloads" in the left side bar.

-- Robert



Robert... just FYI... the errata sheet has been update at the link above; Errata Sheet (Revision 1.2.0 - 12/18/12). Updates (are planned) to go into the next printing of the book.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
P. 107. Section entitled "Methods of the String class"

This section begins with the sentence ...

"Several methods of the String class are commonly used ... ensureIgnoreCase()."

I think that last method is probably equalsIgnoreCase().
 
Robert James Liguori
Author
Posts: 587
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Greg Thomas wrote:P. 107. Section entitled "Methods of the String class"

This section begins with the sentence ...

"Several methods of the String class are commonly used ... ensureIgnoreCase()."

I think that last method is probably equalsIgnoreCase().



Thank you... you are correct... I just put in for this correction... it may or may not make the book update... but I think it will make the update.

Thanks,
Robert
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I'm helping a colleague who is undergoing OCA and using this book. While I didn't like the Kathy Sierra OCJP 1.5 book that much, it's head and shoulders above this. The book is just dreadful with respect completely full of bugs and in an order I just cannot understand.

Just who were the proof readers and can't the author actually read his own book? I found this site because the publisher's website completely fails to provide an errata or mention of one and my colleague had a problem with the code mentioned above and I went looking for an errata to save him more pain:

2) Pg. 65
a) Integer hookSizeList;
should be
Integer hookSizesList.

b) Need clarification on example:
ayList <Integer> hookSizesList = new ArrayList<Integer>();
What is "ayList"?

Firstly hookSizeList is not used in the sample code so should not be in the sample, and secondly it should be ArrayList not ayList. A simple glance of the book would have spotted this. Thirdly no mention whatsoever that this will never compile unless you include the correct package.

But why do I also say badly ordered. Well, for a newcomer reading the book on the first chapter containing code (and subsequent chapters) the code is just snippets with no mention of how to actually get it working, e.g. there's a big section of Fishing yet the code completely forgets to mention the class Fish or a few other classes meaning you cannot compile the code and as you are just starting (I appreciate a limited knowledge of Java is required) it's just bad.

Get past that hurdle and there are concepts mentioned that aren't brough up until later chapters. After about 5 chapters there isn't a single code sample that you can actually type, compile and run.

 
Robert James Liguori
Author
Posts: 587
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Neil,

I am Robert Liguori, one of the authors of the book you have commented on.

The OCA study guide was not meant as a tutorial or as a resource to help the candidates learn Java from the ground up.

The book was designed to help qualified candidates solidify their knowledge, on an objective per objective basis, before going into the exam.

Since the OCA exam has gotten more difficult since the SCJA days, I would recommend that the test candidates have at least one full year of programming in Java, before they start down the path of getting themselves certified. That is, I recommend that test candidates do not purchase our book, until they know Java pretty well. Head First Java by K&B or many of the books by Herbert Schildt are great places to start.

In regards to errata, all books have errata. And while we attempted (with a great amount of effort) to make this book error-free, it wasn't. Most of the items have now been identified, verified, placed on an errata list, and are slated for the next printing of the book.

The design we chose with the code segments, was intentional. It is not practical to include imports, and other surrounding code elements for every piece of code in the book.

Note that I further encourage that test candidates to step through the Enthuware mock exams, prior to sitting the exam. The Enthuware mock exams have a very close look-n-feel to the real exams.

Sincerely,
Robert Liguori

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone !

It seems that there is a small error in the 8th chapter of the book.

P.348, there is a Main() constructor, but no such class is defined. The construcotr should probably refer to the class containing the main method, so it should be replaced by "CEExample()"


Hope this will help.
 
neil walker
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another error, page 152. Declares Integer variable 'valueA' then the next line decides to call it 'number'.

I'm no author, but can somebody explain why, when writing a coding book, the examples aren't proof read or even tested? If were to write a book I'd take the time out to make sure everything was correct and compiled successfully.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hail, Robert!

In the preface, p. xxxvi, OCA Mock Exams, the links of Transcender and Self Test Sofware are exchanged.

"Transcender, www.selftestsoftware.com/cert-prep-materials/oracle.kap
Self Test Software, www.transcender.com"
should read
"Transcender, www.transcender.com
Self Test Software, www.selftestsoftware.com/cert-prep-materials/oracle.kap"

Congratulations to you and Edward by excelent work. The book is terrific!

Regards,

Cleo Hickmann Junior
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Page 32:

public Earth {

...should be...

public Earth() {

 
Keith Peterson
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

neil walker wrote:I'm no author, but can somebody explain why, when writing a coding book, the examples aren't proof read or even tested?



Not to belabor the point, but I too am frustrated by this.

I understand not including full classes, and that partials save space. However, what code is included should be correct.

Everybody makes mistakes, but this book is vexing me.
 
Greg Thomas
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
P. 205, last line above "The super keyword" has the following:



As monthlyPayment is a method, that should read:

 
Greg Thomas
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
P. 205, "The super keyword" has the following text;

If a user-defined method does not use super, the compiler will automatically make a call with super to the parent class’s constructor with no parameters.



I think that should be (my emphasis)

If a user-defined constructor does not use super, the compiler will automatically make a call with super to the parent class’s constructor with no parameters.



Greg
 
Greg Thomas
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
P. 247.

Java has built-in methods for copying the data from one array to another. These methods copy the data and create two independent arrays upon completion.



(my emphasis) I think the phrase "create two independent arrays upon completion" is at best misleading. Yes, you do get two independent arrays, but the arraycopy method you're referring to doesn't create them; they have to already created.

Greg
 
Robert James Liguori
Author
Posts: 587
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

neil walker wrote:Another error, page 152. Declares Integer variable 'valueA' then the next line decides to call it 'number'.

I'm no author, but can somebody explain why, when writing a coding book, the examples aren't proof read or even tested? If were to write a book I'd take the time out to make sure everything was correct and compiled successfully.



Neil, we did our best to proof read and test all of the code.

I explain the cause of some of the errata here:
http://www.amazon.com/review/R3TTFKPENVO4E3/ref=cm_cr_pr_cmt?ie=UTF8&ASIN=0071789421&linkCode=&nodeID=&tag

Note that our goal was to cover as much information as possible for each exam objective to help the candidates pass the test, while trying to keep the material interesting and engaging.

I agree that the product is far from perfect, but our team tried as hard as we could to create a valuable product in the time constraints that we had. Note that Ed and I have received numerous thank you's from people using the book to study for the exam, as they have passed. So to a certain extent, we are achieving our primary goal of helping people get certified. On a slight tangent.. . if you engage in the open source world, you will find that most products are indeed very far from perfect, but the products do meet the goals that they are intended for. Note that I do get frustrated by the quality of many open-source software packages, but I am thankful that I do not need to recreate the business logic that I am seeking to use. Similarly, our book isn't perfect, but it's helping people pass the test.

I do apologize for your frustration. All I can say is that as errata is uncovered by us or our readers, we will just do our best to update the errata sheet and the book where possible.

Sincerely,
-- Robert Liguori
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Robert,

Any idea when this book will be reprinted? I need a study guide ASAP and as far as breadth and depth go, your book seems to be the way to go. I'm just a bit overwhelmed by the errata; it seems as though every other page has some sort of issue. It's just too much for me to keep track of on-the-fly.

I would love to purchase the book as soon as the fixes have been merged in. So, any word on this?

While I'm still wasting your time ;-) , I was wondering if you'd give me your opinion on whether or not this book, and the OCA certification in general, is right for me. My first programming language was Java SE 4, but then I quickly switched to C and C++ and stuck with it until recently. Lately I've been working on higher level stuff in C#/.NET, but I've rearchitected my company's product around Java technologies and will be working almost exclusively with Java in the future. So is this a good place to start for me?
 
Robert James Liguori
Author
Posts: 587
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Gerry,

If you are good at C and C++, then Java should be a walk in the park for you.

IMHO, I think that pursuing the OCA 5/6 would be a better fit for you, since it covers understanding Java-related technologies (Java-related technologies are part of the SCJA thread and are not included in the OCA 7 exam). More specifically, having a strong 30,000 foot appreciation for APIs such as JNDI, JDBC, JMS, EJB, JSF, Swing, web services, etc. will help you as an architect. So, I feel that the OCA 5/6 exam is in better alignment as to where your strong points are. Of course others will disagree with recommendation as there is such a high demand for the OCA/OCP 7 certification in general.

Also, I was just made aware of the following alert, that OCA 7 candidates should probably be aware of as they pursue Java SE 7 certifications:

Alert (TA13-010A) - Oracle Java 7 Security Manager Bypass Vulnerability
http://www.us-cert.gov/cas/techalerts/TA13-010A.html

Of course, once you have achieved the OCA 5/6 certification, I recommend that you do eventually get the OCA 7 and OCP 7 certifications... but all in due time.

Good luck on your endeavors, whatever path you choose,
Robert Liguori
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the first question in the first chapter (Self test understanging Packages)
The answer B is wrong because the package Java.util.* (with the capital J) not exist.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Robert & Edward.

About the practical exam (Appendix H) don't you think that:

Question 13 - If the continue statement is allowed in switch statement then the break is also (as well the continue) in all conditional statements. After all, since the conditional statement is inside a loop, you can have a break or continue statement. Don't you agree?

Question 37 - The answer A is for me also correct because as far as I know, the standard naming conventions tells that the name of a static and final variable must be in Uppercase. Don't you agree? Why only B?

Thanks
Ricardo Santos
 
Jose Ricardo Santos
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Robert & Edward.

Again and about the practical exam (Appendix H) don't you think that:

Question 68 - Why is the answer A wrong? After all the inner class can be private or protected and an Inner Class is...a class.

http://docs.oracle.com/javase/tutorial/java/javaOO/innerclasses.html

Thanks
Ricardo Santos
 
Greenhorn
Posts: 26
Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Roberto Rezende de Assis wrote:Hello Robert

On page 147 there is these 2 lines



The c5 should be 98, not 121.

And I didn't understand from where the 131072 came from and what was its meaning.

Thanks

Roberto


These comments have cofused me too. But then I did a little research and came to this (stackoverflow helped). When you try to perform narrowing conversion (in this case, shove an 18-bit int to a 16-bit char), Java simply omits all exceeding leading bits, ending up with a 16-bit number. Use Windows Calculator in programmer's mode to ascertain.

First case. 131370 decimal is 100000000001100010 binary. Cutting off leading 10, we have 0000000001100010 which is 98 decimal and the 'b' char.
Second case. 131193 is 100000000001111001 binary. Cutting off leading 10, we have 0000000001111001 which is 121 decimal and the 'y' char.
Now about 131072. This number is about that two binary digits we've cut off. Actually, it's not the 10 that makes sense, it's a "meaning one in pos. no. 17" which means 100000000000000000 binary or 131072 decimal which we substract from exceeding ints you can see in the code.

Hope I'm right (although I don't feel myself confident in binary field) and my thoughts will save time to anyone using this book.
 
Devaney Marcondes
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jose Ricardo Santos wrote:

About the practical exam (Appendix H) don't you think that:

Question 13 - If the continue statement is allowed in switch statement then the break is also (as well the continue) in all conditional statements. After all, since the conditional statement is inside a loop, you can have a break or continue statement. Don't you agree?


13 - The continue and break statements are allowed within what types of statements?
A. Loop statements
B. All conditional statements
C. The switch statement
D. Expression statements

answer (book): A and C

In my opnion the answer is wrong.
Only A is right. If you try put the continue statement in the switch will occur a compilation error.
Try this:



The exception say:
TestClass.java:11: error: continue outside of loop
default: continue;
^
1 error
 
Jose Ricardo Santos
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Devaney Marcondes wrote:

Jose Ricardo Santos wrote:

About the practical exam (Appendix H) don't you think that:

Question 13 - If the continue statement is allowed in switch statement then the break is also (as well the continue) in all conditional statements. After all, since the conditional statement is inside a loop, you can have a break or continue statement. Don't you agree?


13 - The continue and break statements are allowed within what types of statements?
A. Loop statements
B. All conditional statements
C. The switch statement
D. Expression statements

answer (book): A and C

In my opnion the answer is wrong.
Only A is right. If you try put the continue statement in the switch will occur a compilation error.
Try this:



The exception say:
TestClass.java:11: error: continue outside of loop
default: continue;
^
1 error



Exactly.

That's what I'm saying. I did the same in the eclipse with the same result. My two posts weren't questions...they were more...critics.

I think the authors don't like to read critics like mine but in my opinion the number of errors are unacceptable. After all, the book is not cheap. I don't understand how two experienced persons and a technical editor let something happen.

Ricardo Santos
 
Mike Petrov
Greenhorn
Posts: 26
Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please consider my errata observations for Chapter 9 (Exceptions). I make my apologies if some items were included here because of my misunderstanding. I also tried not to repeat the official errata Word document.

1. Take a look at Figure 9-2. SQLException is not a subclass to IOException. It's a subclass to Exception.
2. In "Common Unchecked Exceptions" table before Figure 9-3 there is one extra IllegalStateException. My suggest is to omit it or replace it with "RuntimeException".
3. In "The IllegalArgumentException" block that is in "Common Unchecked Exceptions" block it is stated that "The IllegalArgumentException of the java.nio.file package". However, the IllegalArgumentException is part of the java.lang package.
4. In the "Two-Minute Drill" for this chapter in "Understand the Rationale..." block the item no. 5 states that "Checked exceptions are all subclasses to the Exception class; however, RuntimeException and its subclasses are not part of the Exception class". I suppose it was subclassing that was meant under "part of" words. However, RuntimeException is clearly a subclass to Exception. Anyway, it seems that you should refactor rewrite this sentence.

And a suggestion. In the "multi-catch clause" block of the chapter it is never stated that adjoint (that is, super- and subclass) exceptions types are not allowed there. This feature was new to me in Java SE 7 and my first attempt to make use of it crashed against using related exception types. The following googling revealed all the traits of using this feature.
 
Mike Petrov
Greenhorn
Posts: 26
Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And a couple of comments about the mock exam included in the book.

Q13. The continue and break statements are allowed within what types of statements?
A. Loop statements
B. All conditional statements
C. The switch statement
D. Expression statements
Answer: A, C
I suggest rewriting this question since 'continue' isn't used in switch statements, 'break' only.

Q49. If a constructor does not include an access modifier, which modifier will it use by default?
A. A constructor that does not include an access modifier will always be declared as public.
B. A constructor that does not include an access modifier will make use of the same access modifier that is used for its class.
C. A compilation error will occur if a constructor does not include an access modifier.
Answer: B
Correct me if I'm wrong but I think that a constructor that does not include an access modifier has package-private access. It seems that it has nothing to do with the class access modifier. Am I right?

Q88. Which three classes are subclasses of the IOException class?
A. FileNotFoundException
B. SQLException
C. ClassNotFoundException
D. InterruptedIOException
Answer: A, B, D.
SQLException is not a subclass to the IOException. The incorrect statement about SQLException and IOException is also present in the Exceptions chapter, as mentioned in my previous post.
 
Sheriff
Posts: 7126
185
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This does not produce a compile error, but I think it should be changed:

page 57, ch2:



"keeperFish" is set to a new Fish, then immediately set to getFishResult(). Should either be...



...or...

 
Ranch Hand
Posts: 42
Postgres Database Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Please consider the following errata from the Self Test from the chapter 9, Handling Exceptions.
At question no. 5, the last statement from the testMethod3() method gives a compiler error. After throwing an exception, the code cannot be reached.

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Robert Liguori wrote:

Robert Liguori wrote:JavaRanch is not allowing me to remove/replace the legacy link for the errata list...

The new errata list is here: http://mhprofessional.com/product.php?isbn=0071789421.

Just click on "Errata" under "Downloads" in the left side bar.

-- Robert



Robert... just FYI... the errata sheet has been update at the link above; Errata Sheet (Revision 1.2.0 - 12/18/12). Updates (are planned) to go into the next printing of the book.



I was lucky to get one of the new printings of the book. I had to go through some of this errata list items though to double check what edition I bought, because I couldn't find any hint in the book that this was edition 2. My question is now - is there an actual errata list for edition 2? Just realized that errors mentioned here after December have not been removed in my edition (e.g. p. 32 missing parenthesis in constructor "public Earth {" instead of "public Earth(){".
 
grapes are vegan food pellets. Eat this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic