Java OCA OCP Practice Question 1655

Question

Which of the following three functional interfaces is not equivalent to the other two?

  • A. BiFunction<Double,Double,Double>
  • B. BinaryOperator<Double>
  • C. DoubleFunction<Double>
  • D. None of the above. All three are equivalent.


C.

Note

BiFunction<Double,Double,Double> and BinaryOperator<Double> both take two Double input arguments and return a Double value, making them equivalent to one another.

DoubleFunction<Double> takes a single double value and returns a Double value.

It is different from the other two, making Option C correct and Option D incorrect.




PreviousNext

Related