Does BiFunction require two or three parameters?
Moderator: admin
-
- Posts: 35
- Joined: Sat Jun 06, 2020 4:51 pm
- Contact:
Does BiFunction require two or three parameters?
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?
-
- Site Admin
- Posts: 10053
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: Does BiFunction require two or three parameters?
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.
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.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 53 guests