filmov
tv
#96 Need of Stream API in Java

Показать описание
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
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
Комментарии