Streams Versus Collections

Both are the old and new notions of  interfaces to a sequence of elements. So what’s the difference? In a nutshell, collections are about data and streams are about computations. Now imagine, when a movie is being streamed over internet. It is now a stream. The streaming video player needs to have downloaded only a few frames in advance of where the user is watching. Below text from … Continue reading Streams Versus Collections

Java 8 Stream APIs

Streams are not easy to debug 🙂 Java 8 Stream is here to ease our life as far as iteration over different Collections are concerned based on some filter conditions etc.   How we used to do earlier: Say, there is one Employee Class with below properties. public class Employee { private int empId; private String empName; private String gender; private String salary; // and … Continue reading Java 8 Stream APIs