Explaining the solution a bit more would be better. So that everyone could get it easily. you just jumped over streams, lambda, method reference, adv for loop and comparator.
Can you write a program to get top 5 salaries and Employees name given they have Employee ID , Employee NAme , Employee Department , Employee Salary , Employee isActive boolean true property. Please explain in easy words and execute and write program using java 8 functional programming features and streams to Pick only the TOP 5 salary and top 5 Employee Name only. I tried with this following approach but interviewer rejected me and i am not able to solve. Please explain how to write the solution because i am crying so much. public class Employee { //id,name,department,salary,isActive; //Find out top 5 IT department, e.salary))))); } }
Thanks
Explaining the solution a bit more would be better. So that everyone could get it easily. you just jumped over streams, lambda, method reference, adv for loop and comparator.
java 8 show employee name, id, salary in ascending order? can you post
Is toString method is important or not bro!?
It is important to override the string() method otherwise object hascode is printed in the comsole
Can you write a program to get top 5 salaries and Employees name given they have Employee ID , Employee NAme , Employee Department , Employee Salary , Employee isActive boolean true property.
Please explain in easy words and execute and write program using java 8 functional programming features and streams to Pick only the TOP 5 salary and top 5 Employee Name only.
I tried with this following approach but interviewer rejected me and i am not able to solve. Please explain how to write the solution because i am crying so much.
public class Employee {
//id,name,department,salary,isActive;
//Find out top 5 IT department, e.salary)))));
}
}