About Question enthuware.ocpjp.ii.v11.2.3322 :

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

Moderator: admin

Post Reply
dfigueira
Posts: 21
Joined: Thu May 05, 2016 2:50 am
Contact:

About Question enthuware.ocpjp.ii.v11.2.3322 :

Post by dfigueira »

Couldn't this option be accepted as well?

Code: Select all

.collect(Collectors.filtering(p, Collectors.mapping(Book::getTitle, Collectors.toSet()));

It returns the same result as the options marked as correct.

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

Re: About Question enthuware.ocpjp.ii.v11.2.3322 :

Post by admin »

Yes, this is option 5 and it is marked as correct already.
If you like our products and services, please help us by posting your review here.

teodorj
Posts: 33
Joined: Tue Jun 19, 2018 10:27 am
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.3322 :

Post by teodorj »

for the third option to be correct
.collect(Collectors.partitioningBy(p, Collectors.mapping(Book::getTitle, Collectors.toSet())));
the return type should be Map<Boolean, Set<String>> newBooks

But the option
.collect(Collectors.filtering(p, Collectors.mapping(Book::getTitle, Collectors.toSet()));
is incorrect in my side. Please see below.
Image

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

Re: About Question enthuware.ocpjp.ii.v11.2.3322 :

Post by admin »

Which version of which question bank are you using?
If you like our products and services, please help us by posting your review here.

teodorj
Posts: 33
Joined: Tue Jun 19, 2018 10:27 am
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.3322 :

Post by teodorj »

This is for IZ0-817 exam

Ihave the latest ets viewer

Image
Image
Image

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

Re: About Question enthuware.ocpjp.ii.v11.2.3322 :

Post by admin »

ok, I see that it is not updated in 817 question bank. Sorry about that. Updated now in v 1.20
If you like our products and services, please help us by posting your review here.

teodorj
Posts: 33
Joined: Tue Jun 19, 2018 10:27 am
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.3322 :

Post by teodorj »

my ets viewer did not see update on question bank
Image

teodorj
Posts: 33
Joined: Tue Jun 19, 2018 10:27 am
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.3322 :

Post by teodorj »

And also, some of the question in ETS does not have "*" in Discuss button when there are discussion in this forum

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

Re: About Question enthuware.ocpjp.ii.v11.2.3322 :

Post by admin »

Yes, the matching algorithm for questions in the s/w with the subject in topics of the forum is not accurate because of same question appearing in different versions of the exam. It errs on the side of caution.
If you like our products and services, please help us by posting your review here.

edufin166@yahoo.com
Posts: 24
Joined: Wed Sep 28, 2022 9:41 am
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.3322 :

Post by edufin166@yahoo.com »

Theis alternative "is .collect(Collectors.filtering(p,      Collectors.mapping(Book::getTitle, Collectors.toSet())));"

should return Map<String,Set<String>>, but seems me that is returning Set<String>.

Is it really correct?

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

Re: About Question enthuware.ocpjp.ii.v11.2.3322 :

Post by admin »

The call to Collectors.mapping(Book::getTitle, Collectors.toSet()) converts a stream of Books into a Set of title string. This call is wrapped inside Collectors.filtering(p,...), which filters the Set of titles based on the given Predicate. So it returns a Set.
Why do you think it should return a Map?

You may also want to try compiling and running the given code.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: gadsgadsx and 117 guests