About Question enthuware.ocpjp.v8.2.1836 :

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

Moderator: admin

Post Reply
badbishop
Posts: 27
Joined: Fri Jul 22, 2016 9:14 am
Contact:

About Question enthuware.ocpjp.v8.2.1836 :

Post by badbishop »

I think there is an error, as my answer (considered wrong) matches the explanation to the answer considered "correct". Please see the screenshot attached.

There is a missing closing bracket in the explanation: "Map<K,List<T>>"
Attachments
error_in_test3.tiff
error_in_test3.tiff (216.71 KiB) Viewed 5124 times

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

Re: About Question enthuware.ocpjp.v8.2.1836 :

Post by admin »

The answer is correct. The output contains C#, C# because the toString method of Course returns id+" "+category;
If you like our products and services, please help us by posting your review here.

jolique
Posts: 1
Joined: Sun Aug 04, 2019 9:10 am
Contact:

Re: About Question enthuware.ocpjp.v8.2.1836 :

Post by jolique »

Why answer is option 2? Shouldn't it be option 1!? But it's also incorrect though since there's no enclosing brackets.

:cry:

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

Re: About Question enthuware.ocpjp.v8.2.1836 :

Post by admin »

Why do you think option 1 should be the correct answer and not option 2? Please go through the explanation under option 2. Also, try running the code.
If you like our products and services, please help us by posting your review here.

Mushfiq Mammadov
Posts: 32
Joined: Fri Oct 16, 2015 4:33 am
Contact:

Re: About Question enthuware.ocpjp.v8.2.1836 :

Post by Mushfiq Mammadov »

Hi.
It is very interesting for me, why output is

Code: Select all

[C# C#] 
[OCAJP Java, OCPJP Java, OCEJPA Java]
not

Code: Select all

[OCAJP Java, OCPJP Java, OCEJPA Java]
[C# C#]
?

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

Re: About Question enthuware.ocpjp.v8.2.1836 :

Post by admin »

That is as per the iteration order of the Map implementation returned by the collector.
If you like our products and services, please help us by posting your review here.

jme_chg
Posts: 29
Joined: Sun Feb 07, 2021 6:30 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1836 :

Post by jme_chg »

admin wrote:
Tue Oct 15, 2019 8:58 pm
That is as per the iteration order of the Map implementation returned by the collector.
so it cannot be determined ahead of time right?

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 32 guests