Optional class in Java

As part of java8 release Optional class introduced to deal with NullPointerExceptions that occur in Java applications. The Optional class is available in the java.util package and acts as a container that holds values which can be either non-null or empty. Create Optional object The constructor of the Optional class is private, so we cannot … Read more

Employee operations using groupBy

Print the employee names group by designation Print the salary group by country Print the salary group by designation Print employee names based on their location Print the employees whose country is india, if the emp names are matching then compare salary