17.14 Java 8 Stream Api Features part 12 Function BinaryOperator BiFunction Interface

preview_player
Показать описание
BiFunction is a functional interface which can be used as the

assignment target for a lambda expression or method reference. It

represent an operation upon two operands of the same type,

producing a result of the same type as the operands.

Follow on Facebook:

Subscribe to our other channel:
Telusko Hindi :
Рекомендации по теме
Комментарии
Автор

Sir .. because of your videos I crack the interview on JAVA 8
Thx

shravankumar-cipf
Автор

Thank you for simplifying this concept..!! Awesome job!!

funkybuddha
Автор

Sir ur vids are awesome..I have two doubts which i hope u would help..
1.sir u told FUCTIONAL INTERFACES ARE SINGLE ABSTRACT METHOD INTERFACES,
but BinaryOperarator interface has 2 methods but it is also a fuctional interface
2. sir u told we can define a method in an interface using default keyword
but BinaryOperarator interface has defined methods with "public static" modifiers...
pls help me sir, i am struck at this point...

aditirajendran
Автор

the only teacher i found like Saurabh Sir(MySirg).

avkexpress
Автор

I would appreciate your attempt but it seems there are some things to be corrected. for example, reduce will not an int always, it purely depends on the the type of the first argument you are passing to reduce method, It can be any type

rajeshg
Автор

Here is the simple example where it takes String as the first param in the reduce method and it returns a String
public class StreamsReduceExample {

public static void main(String[] args) {
List<String> strings = Arrays.asList(" Hi", "Hello", " How are you?");
String result = strings
.stream()
.reduce("Add me first ", (tempResult, element) -> tempResult.concat(element));
System.out.println(result);
}

}

rajeshg
Автор

It will be better If we are able to download example also

tanya
Автор

Having a hard time explaining things...

harshal
Автор

Please upload the new videos of the stream with correction now on this channel

kanchanmangla