Most Commonly asked Java8 Stream based Interview Question — Part 2

Amar Balu
The Fresh Writes
Published in
4 min readFeb 18, 2023

--

This part is continuation to the already uploaded Part 1 of Most commonly asked Java 8 Stream Based Interview Question.

Image Source : https://javadeveloperzone.com/spring-boot/spring-boot-tutorial/

This part we will discuss about some more questions that can be asked on that Stream that we use to process a List of Objects of Similar type.

The List of Employee Objects is

public class StreamInterviewQuestion {
static List<EmployeeObject> employeeObjectList = new ArrayList<EmployeeObject>();

public static void main(String[] args) {
employeeObjectList.add(new EmployeeObject(111, "Jeya", 30, "Female", "HR", 2011, 25000.0));
employeeObjectList.add(new EmployeeObject(122, "Polish", 29, "Male", "Sales", 2015, 18500.0));
employeeObjectList.add(new EmployeeObject(133, "Thomas", 26, "Male", "Administartion", 2012, 18700.0));
employeeObjectList.add(new EmployeeObject(144, "Gowthami", 29, "Female", "Development", 2014, 33500.0));
employeeObjectList.add(new EmployeeObject(155, "Nisha", 25, "Female", "HR", 2013, 22000.0));
employeeObjectList.add(new EmployeeObject(166, "Issac", 40, "Male"…

--

--

Amar Balu
The Fresh Writes

I'm a front-end developer. I love React and Redux, Java, and Data Science. I write code for fun!. Join our publication : https://medium.com/thefreshwrites