What is a value of the variable result?
int result = Stream.of(-1, 2, -3, 4)
.collect(Collectors.reducing(0, x -> x > 0 ? x : -x, (x, y) -> x + y));What is a value of the variable result?
int result = Stream.of(-1, 2, -3, 4)
.collect(Collectors.reducing(0, x -> x > 0 ? x : -x, (x, y) -> x + y));Create a free account to access the full topic