About Question enthuware.ocajp.i.v7.2.1347 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
Kipchakbaev
Posts: 7
Joined: Sat Jan 18, 2014 8:04 am
Contact:

About Question enthuware.ocajp.i.v7.2.1347 :

Post by Kipchakbaev »

Consider the following code...
public class TestClass{      
class MyException extends Exception {}      
public void myMethod() throws XXXX{          
throw new MyException();      
}
}
What can replace XXXX?
class MyException should be declared outside the class TestClass

admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1347 :

Post by admin »

Why do you think so?
If you like our products and services, please help us by posting your review here.

Kipchakbaev
Posts: 7
Joined: Sat Jan 18, 2014 8:04 am
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1347 :

Post by Kipchakbaev »

Is MyException an inner class? I'm not familiar with the conception of inner classes, but they are not in the exam. Is it correct code snippet in this question?

admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1347 :

Post by admin »

Yes, the code is valid. It is an inner class but that has no bearing on the options because none of the options indicate any possibility that the given code might be invalid. It has now been moved out nevertheless to avoid confusion.

thank you for your feedback!
Paul.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 45 guests