What is stream API, why is it needed?
Ans :- stream is an interface from java.util.stream package which supports stream of objects,which means continuous flow of objects. Stream<T> will perform the following operations:- a. Intermediate operations b.Terminal operations => The stream API is needed for several reasons:- 1.Functional …