Answer:
It is again very simple logic, change the main function in above class as following
List<Employee> employeeList = createEmployeeList(); OptionalInt max = employeeList.stream(). mapToInt(Employee::getAge).max(); if(max.isPresent()) System.out.println("Maximum age of Employee: "+max.getAsInt());