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);
Watch video How to find highest salary employee using Java 8 stream API | #java8stream #interviewquestions online without registration, duration 09 minute 44 second in high hd quality. This video was added by user SJ Programming Solutions 02 February 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 581 once and liked it 11 people.