You can learn Java with me as the Java Programming language is being made easily. It would take a period of minimum three months and maximum 6 months to master Java. I would recommend you to watch all my videos to crack any software interviews that would require Java Programming language as a primary skill.
Working with Stream(JDK 1.8)
=========================
1. A data source.
2. A chain of intermediate operations that form a stream pipeline.
3. A terminal operation that execute the stream pipeline and produce a result.
Intermediate and Terminal :-
=======================
1. Please be informed that the difference between the intermediate and the terminal operations is that intermediate operations return a stream as a result and terminal operations return non-stream values like primitive or Object or collection or may not return anything
2. As intermediate operations return another stream as a result, they can be chained together to form a pipeline of operations. Terminal operations cant be chained together.
3. Pipeline of operations can have any number of intermediate operations but there has to be only one terminal operations that to at the end of the pipe line.
4. I O operations are lazily loaded, when you call intermediate operations, they actually wont get executed. They just store the elements in the memory and they start getting executed once the terminal operation is invoked.
5. As the name suggest, intermediate operation does not give end result, it is just transforming one stream to another steam . On the other hand terminal operation produces the end results.
intermediate operations examples:-
=============================
filter(), map(), limit(), sorted(), distinct(), skip()
Terminal operations examples:-
=========================
forEach(), count(), collect()