I have shown the practical Working of Stream methods like map, Comparator, forEach and Collectors method like groupingby which will group the field on the basis of getter method which is called.
In Example I have shown the Employee class which is having Id, Name, Age of Employees so I have used the Stream API methods to perform intermediate and terminal operations.