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

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
admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

Very sorry about that. I missed your post. You can download it from here: http://enthuware.com/downloads/Exceptio ... ummary.pdf

BTW, you are getting the error because it is not able to extract the file in that location (c:\windows\system32). Please run ETS Viewer from a non-system location such as c:\temp and it should work.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

johnorben
Posts: 4
Joined: Tue Mar 03, 2015 12:28 pm
Contact:

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

Post by johnorben »

This works:
public class forName {

/**
* @param args the command line arguments
*/
public static void main(String[] args) throws ClassNotFoundException {
// TODO code application logic here
Class.forName("java.lang.String");

}

}


But the question is not really valid as displayed, because you have to assume that the throws clause is included in the method declaration.

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

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

Post by admin »

No assumption is required here because the question makes it clear that an exception will be received when the given code snippet is executed. You have to find out which one. It doesn't care how that exception is handled i.e. whether there is a method with a throws clause or a try/catch encompassing the given code snipped.

It is the same in real exam as well. You may be given an incomplete block of code and you will have to answer based on the information given. Any information that is not given is irrelevant to the question.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

Kev1np
Posts: 3
Joined: Sun Oct 25, 2015 1:45 pm
Contact:

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

Post by Kev1np »

admin wrote:No assumption is required here because the question makes it clear that an exception will be received when the given code snippet is executed. You have to find out which one. It doesn't care how that exception is handled i.e. whether there is a method with a throws clause or a try/catch encompassing the given code snipped.

It is the same in real exam as well. You may be given an incomplete block of code and you will have to answer based on the information given. Any information that is not given is irrelevant to the question.

HTH,
Paul.
In that case, the answer is "No exception will be thrown".
When "Will not compile" is a valid answer and a method which throw a checked exception isn't surrounded with a try/catch block, i think it's legit to say it will not compile.

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

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

Post by admin »

If the given code shows a complete method and the code inside that method shows a checked exception being thrown and the method does not have an appropriate throws, then yes, "Will not compile" would be the correct option. But that is not the case in this question.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

mglara
Posts: 2
Joined: Sun Nov 06, 2016 12:46 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1031 : What is the

Post by mglara »

Hi,

Could you tell me the correct answer? Thanks.

I am answering the following:
My answer
My answer
answers1031.JPG (47.78 KiB) Viewed 9538 times
And I have tried different combinations, like for example:

//first attempt// (the one I did the screenshot, and I think it is correct, but the simulator says it is
wrong)
1-> NullPointerException
2-> ArrayIndexOutOfBoundsException
3-> ClassNotFoundException
4->Will not compile

//second attempt//
1-> NullPointerException
2-> ArrayIndexOutOfBoundsException
3-> Will not compile
4->ExceptionInInitializerError

//third attempt//
1-> NullPointerException
2-> ArrayIndexOutOfBoundsException
3-> ClassNotFoundException
4->ExceptionInInitializerError

//fourth attempt//
1-> NullPointerException
2-> ArrayIndexOutOfBoundsException
3-> Will not compile
4->Will not compile


But the exams always answer me this:
Correction.JPG
Correction.JPG (50.28 KiB) Viewed 9538 times
Please, what is the correct answer?

Thanks.

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

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

Post by admin »

Hi,
There is a "Show Correct Answer" button on the bottom right of the DnD screen. Click on it to see the correct answer. Please see attached image.
test.png
test.png (17.73 KiB) Viewed 9536 times
If you like our products and services, please help us by posting your review here.

mglara
Posts: 2
Joined: Sun Nov 06, 2016 12:46 pm
Contact:

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

Post by mglara »

Hi Admin,

Thanks for posting the correct screenshot with the answer.

I was aware about that button, but it is not working for my program. I have done an update, but the button to see the correct answer doesn't work, then, I need to check the explanation that the software provides when we close the "Drag and drop viewer". I attached an screenshot, and you can see it is not clickable.
correctAnswerButton.JPG
correctAnswerButton.JPG (12.69 KiB) Viewed 9535 times

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

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

Post by admin »

The button is disabled because of one of the following two reasons:
1. You are in a test and have not yet finished the test. It will be enabled once you finish the test.
2. You have opened the question out side of a test and have not yet clicked on "Evaluate" button on the main question dialog. See attached image. Once you click evaluate, the DnD dialog will allow to you see the correct answer. This is done to ensure that you don't see the answer by mistake before attempting it yourself.

HTH,
Paul.
test2.png
test2.png (9.23 KiB) Viewed 9534 times
If you like our products and services, please help us by posting your review here.

Far777
Posts: 1
Joined: Tue Nov 22, 2016 7:58 am
Contact:

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

Post by Far777 »

I cannot find ExceptionClassSummary.pdf on my computer - it is missing from System32 folder and when I click on "Exception Class Summary" in "Study Reference" section - I am getting an error message saying that access to file in System32 was denied. And I have checked that folder manually, making sure that I display hidden files.
Google search brought no luck - I cannot find this document. Could you please send it to me?
My email is f.aziz9999@gmail.com
Many thanks!
Regards
Far

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

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

Post by admin »

"Access Denied" means it is not able to extract the file to that location because it was denied access to it by the OS. Please run ETS Viewer as admin and it will be able to.
You may download the file from here: http://enthuware.com/downloads/Exceptio ... ummary.pdf
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 29 guests