Given:
Which statement is equivalent to line 1?
Given:
Which statement is equivalent to line 1?
The equivalent statement to line 1 is 'double totalSalary = list.stream().mapToDouble(e −> e.getSalary() * ratio).reduce(starts, bo);'. This statement correctly utilizes the mapToDouble function to convert the stream to a DoubleStream, applies the provided mapping function, and reduces it using the specified initial value (starts) and the provided BinaryOperator (bo). Other options either have syntax errors or do not use the correct method chain to achieve the same result as the original statement.
B True If endsWith ....sum();
B is true