• 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
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Possible Errata for OCP Java SE 11 Study Guide

 
Ranch Hand
Posts: 227
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: 71636
312
  • 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: 40354
819
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.
 
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic