#96 Need of Stream API in Java

preview_player
Показать описание
Check out our courses:

Coupon: TELUSKO10 (10% Discount)

Coupon: TELUSKO20 (20% Discount)

For More Queries WhatsApp or Call on : +919008963671

Udemy Courses:

In this lecture we will learn:
- What is Stream API?
- Method in a stream interface
- Difference between normal and enhanced for loop
- forEach method in a list interface

#1
- Stream API is the concept introduced in Java 1.8 version.
- The Stream API is used to process collections of objects.
- Stream is a sequence of objects that supports various methods to produce the desired result.
- asList() is a method that gives a list that belongs to a class array.
- Stream interface provides a lot of methods like filter(), map(), reduce(), etc.
- A stream is not a data structure instead it takes input from Collections like arrays.

#2
- Normal for loop iterates over the elements one by one whereas enhanced for loop array itself give a value and that value goes into a variable say n.
- We can also print all the values present in an array by using the forEach method().
- forEach method gives one value at a time and we can save that value in a variable say n and print it.
- forEach method is part of a list interface, that gives one value at a time and then you can perform operations on it.

More Learning :

Donation:
PayPal Id : navinreddy20
Рекомендации по теме
Комментарии
Автор

When I watch Navin sir's explanation I feel like I have already understood the concept before in the first 1min of the video itself. Navin sir you are my inspiration to learn not only the concepts but also your teaching technique, it helps me teach others and forge my memory.

aakashjana
Автор

Sir helped me in being a java developer. Keep it up sir 🎉

WithSolanki
Автор

More Theory makes its easy compare then practical 😅

AnjaliPrajapati-ol
join shbcf.ru