How to find highest salary employee using Java 8 stream API |

Описание к видео How to find highest salary employee using Java 8 stream API |

How to find the employee which is having highest salary in the organization ?
Print the employee which is having maximum salary using java8 stream API?
Java8 stream API sorted method

Hello All,

In this video we will see how to find highest salary employee in the organization using java 8 stream API?

Employee employee = empList.stream().sorted(Comparator.comparing(Employee::getSalary).reversed()).findFirst().get();

System.out.println(" Highest salary employee is : "+employee);

#javainterviewquestions #interviewquestions #preparation #java8stream

Комментарии

Информация по комментариям в разработке