About Question enthuware.ocpjp.v8.2.1810 :

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

Moderator: admin

Post Reply
Perelun
Posts: 5
Joined: Sat Jul 06, 2019 7:10 am
Contact:

About Question enthuware.ocpjp.v8.2.1810 :

Post by Perelun »

In the explanation: the phrase " Finally, the average() method computes the average of all the elements, which is 0.0. " is negated by "Since the stream contains no element and the average() method returns an OptionalDouble containing OptionalDouble.empty".

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

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

Post by admin »

Actually, the exact sentence used in the explanation is, "Finally, the average() method tries to compute the average of all the elements." This is what the code, as written, is meant to do. However, as the explanation further notes, something else happens.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests