File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "JavaCaps mock 1 Q:9" Watch "JavaCaps mock 1 Q:9" New topic
Author

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: http://aspose.com/file-tools
 
subject: JavaCaps mock 1 Q:9