16 BiPredicate, BiFunction and BiConsumer - Two Argument Functional Interfaces in Java 8

Опубликовано: 25 Октябрь 2024
на канале: coderolls
59
0

#Java8Features #BiPredicate #BiFunction #BiConsumer #TwoArgumentFunctionalInterfaces

Example code can be found here:

BiPredicate: https://github.com/coderolls/java-8-f...

BiFunction: https://github.com/coderolls/java-8-f...

BiConsumer: https://github.com/coderolls/java-8-f...

In the previous video we have seen predefined functional interfaces predicate function consumer and supplier. In this video we will see to two argument functional interfaces.

The predefined function and interfaces like predicate, function and consumer will accept only one argument but two argument functional interfaces will accept two arguments. There are three Two Argument Functional interfaces and these are as given below

1. BiPredicate

BiPredicate will accept two arguments and it will provide a Boolean result.

2. BiFunction

BiFunction will take two arguments as input and it will provide a result of any type.

3. BiConsumer

BiConsumer will take two arguments as input and it will not provide any result.

Since, spplier do not accept in argument, there is no BiSupplier.

Watch this video to learn more about Two Argument Functional Interfaces with examples.

This video is a Part of Java 8 Features Full Course. ▶️    • Java 8 Features - Full Course  

GitHub Repository Link: https://github.com/coderolls/java-8-f...

00:00 Recap

Buy me a coffee ☕: https://www.buymeacoffee.com/gauravku...

This is video is uploaded by codeRolls. Visit us at https://coderolls.com

Subscribe to my YouTube Channel ►    / @coderolls  

Follow us on:

Twitter ►   / coderolls  
Facebook ►   / coderolls  
Instagram ►   / coderolls  
Pinterest ►   / coderolls