01-Stream Interface Package overview | java.util.stream PKG | Java8

Veröffentlicht am: 27 Januar 2024
auf dem Kanal: Prakash IT
91
4

As part of this video we will discuss below things
- What’s Stream API?
- What exactly java.util.stream package consists of?
- What are the feature’s of stream?
- What are stream operations and What’s the significance of their operation?
- How Stream differs from Collections?
- How many ways we can create a stream?
- How many intermediate operations and how many terminal operations we -- can perform on a stream?
- What are intermediate operations?
- What are terminal operations?
Next we will see
- Stream API in detail with example
- Real time use case with stream API.
- Interview bits on Stream API

Terminal Operations
anyMatch()
allMatch()
noneMatch()
collect()
count()
findAny()
findFirst()
forEach()
min()
max()
reduce()
toArray() etc..

Intermediate Operations
filter()
map()
flatMap()
distinct()
sorted()
peek()
limit()
skip() etc..

How Stream differs from Collections?

Collection:
Collection is an in-memory data structure, which holds all the values that the data structure currently has.
Every element in the Collection has to be computed before we add it to the Collection. Operations such as searching, sorting, insertion, manipulation, and deletion can be performed on a Collection like List, Set, Map etc..

Stream:
On the other hand, Stream is an API that is introduced in Java 8 which is used to process collections of objects.
A stream is a sequence of objects that supports various methods which can be pipelined to produce the desired result.
The Stream API is used to process collections of objects.
A stream is not a data structure instead it takes input from the Collections, Arrays, or I/O channels.
Streams don’t change the original data structure, they only provide the result as per the pipelined methods.

java.util.Function Package link :
   • 01-Predefined Functional Interface In...  

Java8 link :
   • 01 Lambda Expression in java  

#prakashit #stream #java8stream #java8 #streamapi


Auf dieser Seite können Sie das Online-Video 01-Stream Interface Package overview | java.util.stream PKG | Java8 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Prakash IT 27 Januar 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 91 Mal angesehen und es wurde von 4 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!