About Question enthuware.ocpjp.v8.2.1738 :

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

Moderator: admin

Post Reply
AungKNyar
Posts: 5
Joined: Mon Jan 14, 2019 11:16 pm
Contact:

About Question enthuware.ocpjp.v8.2.1738 :

Post by AungKNyar »

The answer says reduce() and max().
Actually there are three answers right?
reduce()
max()
sum()

Why is sum() not included as the correct answer?

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

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

Post by admin »

The following explanation is already given with this option:
This is a valid reduction operation but it is not in java.util.stream.Stream interface.
Methods to sum up the numbers in a stream are available in specialized Stream interfaces such an IntStream, LongStream, and DoubleStream.
If you like our products and services, please help us by posting your review here.

bvrulez
Posts: 33
Joined: Sat Feb 15, 2020 12:44 am
Contact:

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

Post by bvrulez »

admin wrote:
Fri Jan 25, 2019 10:29 pm
The following explanation is already given with this option:
This is a valid reduction operation but it is not in java.util.stream.Stream interface.
Methods to sum up the numbers in a stream are available in specialized Stream interfaces such an IntStream, LongStream, and DoubleStream.
This explanation does not show up in my review of the (wrongly) answered question. It just shows an explanation for "add": "There is no such method in Stream interface." Maybe this message is also related to "sum", but it just shows under "add".

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

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

Post by admin »

Please check your private message/email.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 36 guests