1z0-816 Java SE 11 Programmer II

Loading demo links...

Showing 10–10 of 10 questions

Question 10

Given:

Which statement is equivalent to line 1?

Select an option, then click Submit answer.

  • double totalSalary = list.stream().map(e −> e.getSalary() * ratio).reduce(bo).ifPresent (p −> p.doubleValue());

  • double totalSalary = list.stream().mapToDouble(e −> e.getSalary() * ratio).sum;

  • double totalSalary = list.stream().map(Employee::getSalary * ratio).reduce(bo).orElse(0.0);

  • double totalSalary = list.stream().mapToDouble(e −> e.getSalary() * ratio).reduce(starts, bo);