Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Possible errata in OCP Java SE 8 Programmer II Study Guide book (2015)  RSS feed

 
Evgeniy Mamaev
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone at CodeRanch!

Many thanks to Scott and Jeanne for their endeavor of writing the series of study guides along with OCA/OCP 8 Programmer Practice Tests. I am convinced it could be much harder to prepare for the exams if we had no such convenient tools.

It is pleasure to have an opportunity to share my doubts about one statement in OCP Java SE 8 Programmer II Study Guide book (2015).

Please, correct me if I am wrong. It seems to be an errata on page 303, at the very top of it. Where JammedTurkeyCage’s close() method is claimed to throw a checked exception. Whereas on previous page 302 we have such a declaration:



Doesn't that tell us JammedTurkeyCage’s close() method actually throws an unchecked exception? Considering the fact that IllegalStateException was mentioned to be an unchecked exception on page 288 in table 6.3. Which perfectly accords with this Oracle docs page https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html

I guess, I am not a pioneer in tackling that particular statement. But I haven't found any mention of it neither here on CodeRanch neither here https://www.selikoff.net/java-ocp-8-programmer-ii-study-guide/.

Thank you in advance for your attention and consideration of my assumption.

Kind regards,

Evgeniy
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37230
519
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Evgeniy,
Thanks for asking. In the book, that sentence says "Note that if JammedTurkeyCage's close() method threw a checked exception". We aren't saying that it throws a checked exception. We are describing what would happen if it did.
 
Evgeniy Mamaev
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne,

Thank you for quick answer.

Yes, of course. Now I recognize it, but yesterday my head was, obviously, overheated.

Thanks one more time.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!