Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

OCA/OCP JAVA SE 8 - Possible Wrong answer for review Question of Chapter 8 Question 32

 
Greenhorn
Posts: 2
Spring Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't Know if I'm thinking right...please give me a hand..

On the question 32 - Chapter 8 Handling Exceptions




I agree that the answear is:

A. The code does not compile because of line m1.




But on the explanation on Appendix Answers

Also the override of roar() in the Lion class is valid, since the overridden method has a
broader access modifier and does not declare any new or broader checked exceptions.



But roar() was not overridded, but overloaded!

Sorry if I'm missing something!

Thanks

 
author & internet detective
Posts: 40469
821
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Felipe,
Welcome to CodeRanch! This is a good find. I've added to the errata
 
Felipe Motta
Greenhorn
Posts: 2
Spring Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot for your feedback!
Your book and this forum are Amazing!
 
And will you succeed? Yes you will indeed! (98 and 3/4 % guaranteed) - Seuss. tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic