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

Опубликовано: 27 Январь 2024
на канале: 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


На этой странице сайта вы можете посмотреть видео онлайн 01-Stream Interface Package overview | java.util.stream PKG | Java8 длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Prakash IT 27 Январь 2024, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 91 раз и оно понравилось 4 зрителям. Приятного просмотра!