Java 8 - Functional Interfaces -Predicate, Function, BinaryOperator,UnaryOperator, Supplier-Consumer

preview_player
Показать описание
In this video, I have explained about :

JDK 8 Functional Interfaces -
Predicate,
Function,
BinaryOperator,
UnaryOperator,
Supplier,
Consumer

It can be written with @FunctionalInterface annotation also.

~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:

Follow me on my Facebook Page:

Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:

Paid courses (Recorded) videos:
Рекомендации по теме
Комментарии
Автор

If teaching is an art, you are a Picasso of it. 🙏. I was always afraid of these topics but now I am able to understand it day by day.

tushararora
Автор

Very detailed explanation., i was searching this explanation all over the internet and here the search completed.

Tidda
Автор

It shoud be long, I am enjoying :D Thanks, I should have enrolled in your course.

jatinsharma
Автор

I came here to learn lambda expression, after watching your 6th video in collections. Collection series is very good. Thank you. 🤝🤝🤝

venkat
Автор

Thanks for covering most important types

swamyas
Автор

This is where Sir java starts to get
Like covering most of the functional interfaces....


Working on comparators


Later on sir we can have videos on javas completable futures and it's similarities with promises in java script...



Ek teer do


Anyways you doing a great job....
Keep helping us like this

MrUmang
Автор

Please update selenium video and Free CRN. You are one of the best in YouTube. Please new video

dessam
Автор

Thank you for sharing your knowledge! :)

developerscentre
Автор

Thank you.. Will try to use above functions in my automation code

vijayaraghavanvashudevan
Автор

Excellent tutorial but can someone also share some real world applications of the respective functional interfaces and it's methods, thanks.

tazzyreign
Автор

explained well Naveen but y 2 interfaces for the same purpose, unaryoperator and function.also top 2 interfaces are not used anywhere y so.

karamjitsinghsehdev
Автор

Hi @Naveen ji, i have seen now Bifunction is not T, T, T it is T, U, R which means any types of input arguments and any type of output result. I think this is latest one

pavithra
Автор

Please can you update your selenium with java videos alot have changed. Thanks you

dessam
Автор

@Naveen Automation Labs : Can you please let us know why Comparable interface is not a Functional Interface though it has only one abstract method compareTo and why comparator is a Functional Interface though it has two abstract methods compare and equals with a demo program.

tulasiramsunkara
Автор

Thanks Naveen for sharing this.
But just wanted to clarify one part where you said BiFunction and BinaryOperator are same. It doesn't seem like that always. BiFunction can have any type of two inputs and any type of Return type, whereas we can replace BiFunction with use of BinaryOperator when both the inputs and output arguments of same type. Please correct me if my understanding is correct?

arkaimps
Автор

public static void main(String[] args) {
Consumer<String> func = x -> System.out.println(x);
// void accept(T t) is an abstract method
func.accept("This is Naveen here!!!"); // This is Naveen here!!!

List<Integer> list = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 125, 1453, 23456, 852);
list.forEach(x -> System.out.print(x + "\t"));
//

System.out.println();

list.forEach(x -> "\t")); // prints the length . Example 23456 has 5 digits, therefore length = 5
// 1 1 1 1 1 1 1 1 1 2 3 4 5 3
}

amanueltesfu