filmov
tv
How Java 8 Stream API Works ? | Stream API Foundation | EP 2

Показать описание
In this video we will learn about one of the Java 8's new features called Stream API. The java stream api introduced in java 8, changed the way we write and read java code.
Java Stream API is an absolute beast when it comes to data processing as it enables the scope of processing the data in a declarative approach. It opens a way to fusion multiple methods by doing method chaining and gives us a way to write lambda expressions as most of the Java streams methods accepts lambda as a parameter. Thus we can reduce our traditional loops/condition checks / conversion code and significantly improve our code readability.
In this Java Stream api tutorial, We will discuss about the followings :
1. Imperative vs Declarative programming using Java 8
2. How Stream API works with Animations
3. Stream API Ordering / Order of execution
4. Stream API Lazy behaviour
5. intermediate and terminal operations
6. java stream filter
7. Java stream map
8. Java stream foreach
We can consider all these thing as java's new features and invest our time learning them in details.
TIMESTAMP
------------------------
00:00 - Imperative programming
05:11- Declarative Programming using Stream
08:42 - Java stream Filter
10:23- Functional Interface : Predicate
13:08 - How Stream API's filter works ?
19:58 - Streams are Immutable
22:14 - How Java 8 Stream API works ?
25:33 - Stream API Order of execution ( Ordering )
36:57 - Java stream map()
54:25 - intermediate vs terminal operations
01:01:59 - Java Streams are Lazy
01:04:08 - stream api terminal operations - collect , count , forEach
01:14:27 - Stream api programming interview questions
01:25:11 - Stream API - limit(n)
As we have discussed, The java Stream api is not a data structure but it is used to process a collection of objects.
There are two kind of operations used in Stream API.
One type of operation is called Intermediate operation. Intermediate operations are used to perform operations like filtration of elements , element transformation to another type, limiting data in a stream pipeline etc. After performing any intermediate operation over a stream, we again get a Stream Object back.
One point to note here is , the Streams in java are lazy. They do nothing until a terminal operation invoked over them. So terminal operations are going to trigger or start a stream , helps the stream to start processing the data in the pipeline.
Methods like filter(),map(),limit() are called intermediate operations, where as the methods like forEach(),collect(),count() are called terminal operations.
Another key point to remember is , any intermediate operations that we perform over a stream doesn't modify the source stream object. So streams in java are immutable and any intermediate operations performed over a stream object returns a new stream.
The last but not the least, Once we done consuming data from a stream, the stream pipeline considered as consumed and wont be reusable again.
In this java 8 stream api foundation tutorial, we will discuss everything in detail.
For more free/paid courses visit
LINKS AND FREE LEARNING RESOURCES
========
Watch my new mock interview series for java developers
Watch my new Hello spring boot series
Watch Spring boot Hot topics
spring core
spring mvc
spring mvc intermediate
Spring JDBC
spring live project
SPRING SECURITY COURSE[NEW]
For more courses visit
Any time you are getting stuck with issues, Feel free to ask for support.
you can ping me on my Facebook page
Make sure to join my private Facebook page (Ask me here)
“SeleniumExpress - Support"
you can ask for support in my website forum
Follow me on Insta
Java Stream API is an absolute beast when it comes to data processing as it enables the scope of processing the data in a declarative approach. It opens a way to fusion multiple methods by doing method chaining and gives us a way to write lambda expressions as most of the Java streams methods accepts lambda as a parameter. Thus we can reduce our traditional loops/condition checks / conversion code and significantly improve our code readability.
In this Java Stream api tutorial, We will discuss about the followings :
1. Imperative vs Declarative programming using Java 8
2. How Stream API works with Animations
3. Stream API Ordering / Order of execution
4. Stream API Lazy behaviour
5. intermediate and terminal operations
6. java stream filter
7. Java stream map
8. Java stream foreach
We can consider all these thing as java's new features and invest our time learning them in details.
TIMESTAMP
------------------------
00:00 - Imperative programming
05:11- Declarative Programming using Stream
08:42 - Java stream Filter
10:23- Functional Interface : Predicate
13:08 - How Stream API's filter works ?
19:58 - Streams are Immutable
22:14 - How Java 8 Stream API works ?
25:33 - Stream API Order of execution ( Ordering )
36:57 - Java stream map()
54:25 - intermediate vs terminal operations
01:01:59 - Java Streams are Lazy
01:04:08 - stream api terminal operations - collect , count , forEach
01:14:27 - Stream api programming interview questions
01:25:11 - Stream API - limit(n)
As we have discussed, The java Stream api is not a data structure but it is used to process a collection of objects.
There are two kind of operations used in Stream API.
One type of operation is called Intermediate operation. Intermediate operations are used to perform operations like filtration of elements , element transformation to another type, limiting data in a stream pipeline etc. After performing any intermediate operation over a stream, we again get a Stream Object back.
One point to note here is , the Streams in java are lazy. They do nothing until a terminal operation invoked over them. So terminal operations are going to trigger or start a stream , helps the stream to start processing the data in the pipeline.
Methods like filter(),map(),limit() are called intermediate operations, where as the methods like forEach(),collect(),count() are called terminal operations.
Another key point to remember is , any intermediate operations that we perform over a stream doesn't modify the source stream object. So streams in java are immutable and any intermediate operations performed over a stream object returns a new stream.
The last but not the least, Once we done consuming data from a stream, the stream pipeline considered as consumed and wont be reusable again.
In this java 8 stream api foundation tutorial, we will discuss everything in detail.
For more free/paid courses visit
LINKS AND FREE LEARNING RESOURCES
========
Watch my new mock interview series for java developers
Watch my new Hello spring boot series
Watch Spring boot Hot topics
spring core
spring mvc
spring mvc intermediate
Spring JDBC
spring live project
SPRING SECURITY COURSE[NEW]
For more courses visit
Any time you are getting stuck with issues, Feel free to ask for support.
you can ping me on my Facebook page
Make sure to join my private Facebook page (Ask me here)
“SeleniumExpress - Support"
you can ask for support in my website forum
Follow me on Insta
Комментарии