Page 1 of 1
About Question enthuware.ocpjp.v8.2.1836 :
Posted: Sat Jul 30, 2016 7:55 am
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>>"
Re: About Question enthuware.ocpjp.v8.2.1836 :
Posted: Sat Jul 30, 2016 7:09 pm
by admin
The answer is correct. The output contains C#, C# because the toString method of Course returns id+" "+category;
Re: About Question enthuware.ocpjp.v8.2.1836 :
Posted: Sun Aug 04, 2019 9:13 am
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.
Re: About Question enthuware.ocpjp.v8.2.1836 :
Posted: Sun Aug 04, 2019 10:25 am
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.
Re: About Question enthuware.ocpjp.v8.2.1836 :
Posted: Tue Oct 15, 2019 4:37 am
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#]
?
Re: About Question enthuware.ocpjp.v8.2.1836 :
Posted: Tue Oct 15, 2019 8:58 pm
by admin
That is as per the iteration order of the Map implementation returned by the collector.
Re: About Question enthuware.ocpjp.v8.2.1836 :
Posted: Sun Apr 25, 2021 6:58 am
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?