Stream.reduce(Float,BinaryOperator) BinaryOperator refers which functional interface method?

Look at the Stream Javadoc:

T reduce(T identity, BinaryOperator<T> accumulator)

(sum, price)->sum+price implements a BinaryOperator<Float> in your example.

This functional interface has a method that accepts two arguments of the same type (Float in your case) and returns a result of that same type.


Because you mentioned "functional interface method": reduce is actually calling apply of BiFunction (from which BinaryOperator extends).