This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin Cookbook and have Ken Kousen on-line!
See this thread for details.
Win a copy of Kotlin Cookbook this week in the Kotlin forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

Possible Errata for OCP Java SE 11 Study Guide

 
Ranch Hand
Posts: 179
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found some possible errata in the OCP Java SE11 Programmer I Study Guide by Jeanne Boyarsky and Scott Selikoff

Page 385: The last line should read "Since String does NOT implement Canine,...".

Page 409: In table 10.1, for Error type, it is "No" for the question "Okay for program to catch?". Shouldn't this be "Yes" instead? It may be bad practice to catch an Error, but the compiler is not going to complain if you try to catch an Error. After all, an Error is an unchecked exception, and it's okay to catch an unchecked exception. This is demonstrated on page 448 question 22, in which StackoverflowError is a valid type to catch.

Page 445: For question 12, isn't F a correct answer as well since an uncaught NumberFormatException is thrown?
 
Marshal
Posts: 67051
255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please tell us the exact text of the first line you are worried about. Please check here; you have probably found a “new” erratum.
I think thee second question is asking about correct practice; it is usually good practice not to catch Errors, so the book is probably correct.
Please supply the complete text for the third point.
 
author & internet detective
Posts: 39771
797
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Edmund Yong wrote:Page 385: The last line should read "Since String does NOT implement Canine,...".  


Confirmed an added to the errata list crediting you as the "finder"

Edmund Yong wrote:Page 409: In table 10.1, for Error type, it is "No" for the question "Okay for program to catch?". Shouldn't this be "Yes" instead? It may be bad practice to catch an Error, but the compiler is not going to complain if you try to catch an Error. After all, an Error is an unchecked exception, and it's okay to catch an unchecked exception. This is demonstrated on page 448 question 22, in which StackoverflowError is a valid type to catch.


Not an errata. The column isn't about whether the code will compile. It's about whether you should be doing it.

Edmund Yong wrote:Page 445: For question 12, isn't F a correct answer as well since an uncaught NumberFormatException is thrown?


No. This is a single answer question (note there is not a "choose all that apply"). Option A includes the output and the NumberFormatException. Option F just addresses the exception. Remember that an unhandled exception does result in a stack trace.
 
The fastest and most reliable components of any system are those that are not there. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!