About Question enthuware.ocpjp.v21.2.3220 :

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

Moderator: admin

Post Reply
ftejada
Posts: 8
Joined: Mon Jan 28, 2019 2:00 pm
Contact:

About Question enthuware.ocpjp.v21.2.3220 :

Post by ftejada »

Given the code snipped
public class X {
//line 1: insert code here
}
there is no way var al = new ArrayList<>() can fit on line 1, assuming we're talking about field declaration, source: https://openjdk.org/projects/amber/guid ... n%20types.

I think we should either point out that //line 1 could be part of a method (in that case all suggested answers would make sense) or assume that the class defines other instance members (which would likely make option String s = asdf valid, assuming that the field asdf is declared somewhere within the scope of X and is of type String)

Thanks,

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

Re: About Question enthuware.ocpjp.v21.2.3220 :

Post by admin »

Not sure I understand your point. It is an incorrect option, right?

ftejada
Posts: 8
Joined: Mon Jan 28, 2019 2:00 pm
Contact:

Re: About Question enthuware.ocpjp.v21.2.3220 :

Post by ftejada »

The question expects var al = new ArrayList<>() to be correct, but the way it's formulated, there is no way that option can be valid.

question:
Which of the following are valid at line 1?
public class X {
// line 1: insert code here
}
expected answers:
String s = this.toString; // OK
String s; // OK
var al = new ArrayList<>(); // impossible (c.f. refer to my suggestions in the initial post)
Hope I made my point clear this time, thx.

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

Re: About Question enthuware.ocpjp.v21.2.3220 :

Post by admin »

I see that it is marked as incorrect and an explanation is also given for this option. Only two options are marked correct.

See screenshot here: https://ibb.co/RpcrcFRq

Please confirm if you are seeing something else.

ftejada
Posts: 8
Joined: Mon Jan 28, 2019 2:00 pm
Contact:

Re: About Question enthuware.ocpjp.v21.2.3220 :

Post by ftejada »

I do have something else https://ibb.co/ZyJCWLb, maybe it's an outdated version ? I'm using build 20220606

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

Re: About Question enthuware.ocpjp.v21.2.3220 :

Post by admin »

You have an older version of the question bank (not ETS Viewer). You can update the qb from ets viewer using Tools -> Check for question bank update menu.

maruusa
Posts: 1
Joined: Tue Mar 25, 2025 8:41 pm
Contact:

Re: About Question enthuware.ocpjp.v21.2.3220 :

Post by maruusa »

admin wrote:
Sat Mar 15, 2025 11:15 am
Not sure I understand your point. It is an incorrect option, right? Slither io
Do you have any questions or concerns about this issue?

Post Reply

Who is online

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