Page 1 of 1

Does BiFunction require two or three parameters?

Posted: Mon Jun 29, 2020 12:55 pm
by dimitrilc
at Kindle Location 8965, the book states that BiFunction takes two parameters, BiFunction <T, R>. But on Java's doc and in the examples(in the book), BiFunction seems to take three parameters. Is this a typo, or is there anything else that I am missing?

Re: Does BiFunction require two or three parameters?

Posted: Mon Jun 29, 2020 1:22 pm
by admin
BiFunction takes two parameters. The sentence in the book, " it takes two arguments of type T and U
and returns a result of type R. Its functional method is R apply(T t, U u)" is correct. But book should say BiFunction<T, U, R> instead of BiFunction<T, R>. T and U are parameter types and R is the return type. The missing U is a typo.