Page 1 of 1

About Question enthuware.ocpjp.v8.2.1793 :

Posted: Sat Jul 01, 2017 12:55 pm
by ssszzz
type in explanation of variant 'ls.stream().reduce((a, b)->a>b?a:b)':
Therefore, it will return Optional object containing Integer 9 instead of just Integer 9 and you cannot assign an object of class Optional to a variable of type int.
Not 9, but 47.
In the question body there is List<Integer> ls = Arrays.asList(10, 47, 33, 23);

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

Posted: Sat Jul 01, 2017 10:48 pm
by admin
Fixed.
thank you for your feedback!
Paul.