This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Mock Exam Errata and the fly likes JavaCaps mock 1 Q:9 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "JavaCaps mock 1 Q:9" Watch "JavaCaps mock 1 Q:9" New topic

JavaCaps mock 1 Q:9

Haining Mu
Ranch Hand

Joined: Jun 01, 2001
Posts: 51

Answer given:A,D
for D, in MyMethod() in MyExp2 class, Unchecked exception can be throw, even in method declare, it can throws Unchecked exception.
I think if D says: MyMethod() cannot declare IOException exception in MyExp2 class , then it would be correct.
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
I agree with you here. Java insists that an overriding method can not throw a checked exception not thrown by the method it is overriding. It can however throw runtime exceptions.

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
I agree. Here's the link:
subject: JavaCaps mock 1 Q:9
It's not a secret anymore!