• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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: 41855
904
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!
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Jeanne Boyarsky

You have added it to the errata under question 30 but it is in fact question 32.

d6f4b6fd4bf4b894d.PNG
[Thumbnail for d6f4b6fd4bf4b894d.PNG]
 
Jeanne Boyarsky
author & internet detective
Posts: 41855
904
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Updated. Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic