About Question enthuware.ocajp.i.v8.2.2015 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
tangjm
Posts: 5
Joined: Mon Jan 17, 2022 12:32 pm
Contact:

About Question enthuware.ocajp.i.v8.2.2015 :

Post by tangjm »

There seems to be an easier explanation. If you observe closely, all but one of the options will result in an ArrayIndexOutOfBoundsException. All of the options involve matrices with a first dimension expression of 4 or 5, yet only one of the options have a 'for' loop termination condition of i < 5. The others therefore end up trying to access the 5th index of an array with only 4 or 5 elements.

In light of the enthuware explanation, I think this wasn't what the question was trying to test. Maybe change the available answer options or recategorise the question?

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

Re: About Question enthuware.ocajp.i.v8.2.2015 :

Post by admin »

Yes, process of elimination is a good way to spot the wrong options. It is a useful strategy when you are not sure about the right approach to solve the given problem. The purpose of the explanation is to show you the right approach.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 34 guests