Mastering Java and Spring Boot - Live Course : https://bit.ly/TeluskoJavaLive
For More Queries WhatsApp or Call on : +919008963671
In this lecture we will learn:
- Working of the filter method
- What is a predicate method
- Map method and its working
- How reduce method works?
- Sorted and ParallelStream methods with stream
#1
filter() method:-
- filter method needs an object as a parameter of type Predicate.
- Predicate is an interface that contains a method called test which returns a boolean value.
- When you apply the filter method on a value, if it satisfies the condition then it goes further otherwise stops.
#2
map() method:-
- Map needs an object of a functional and it is a functional interface.
- It contains a method called apply(). In apply method, we can do the desired operation on a value.
- Function takes two types, one what is accepted and the other that it returns.
#3
reduce() method:-
- Reduce method takes two parameters, one is the type and the second is the BinaryOperator for operation.
- BinaryOperator extends the BiFunction and it calls a method to apply.
#4
sorted() and parallelStream() method:-
- By using the sorted() method with a stream, it will return a sorted stream.
- There is a method called parallelStream() used with the filter that creates multiple threads to work faster.
- parallelStream should not be used with a sorted method as sorting requires all the elements together, so there multiple threads will create an ambiguity.
Github repo : https://github.com/navinreddy20/Javacode.git
Instagram : https://www.instagram.com/navinreddyofficial/
Linkedin : https://in.linkedin.com/in/navinreddy20
Discord : https://discord.gg/UrYda98D
Java:- https://bit.ly/JavaUdemyTelusko
Spring:- https://bit.ly/SpringUdemyTelusko
More Learning :
Java :- https://bit.ly/3x6rr0N
Python :- https://bit.ly/3GRc7JX
Django :- https://bit.ly/3MmoJK6
JavaScript :- https://bit.ly/3tiAlHo
Node JS :- https://bit.ly/3GT4liq
Rest Api :-https://bit.ly/3MjhZwt
Servlet :- https://bit.ly/3Q7eA7k
Spring Framework :- https://bit.ly/3xi7buh
Design Patterns in Java :- https://bit.ly/3MocXiq
Docker :- https://bit.ly/3xjWzLA
Blockchain Tutorial :- https://bit.ly/3NSbOkc
Corda Tutorial:- https://bit.ly/3thbUKa
Hyperledger Fabric :- https://bit.ly/38RZCRB
NoSQL Tutorial :- https://bit.ly/3aJpRuc
Mysql Tutorial :- https://bit.ly/3thpr4L
Data Structures using Java :- https://bit.ly/3MuJa7S
Git Tutorial :- https://bit.ly/3NXyCPu
Donation:
PayPal Id : navinreddy20
https://www.telusko.com