Challenge: Sorting Employees
Aufgabe
Swipe to start coding
Implement a Comparator
to sort the list of employees
based on the specified criteria.
- Sort the employees by years of experience in ascending order, and then apply the
reversed()
method to make the order descending. - If the years of experience are the same, sort the employees with the same experience by
salary
in descending order. - If both experience and salary are the same, sort by
name
in alphabetical order. - Use the created comparator as an argument for the
sort()
method to sort the employee list. - Print the sorted list of employees.
Lösung
solution.java
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 10
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Awesome!
Completion rate improved to 2.33Awesome!
Completion rate improved to 2.33
Challenge: Sorting Employees
Aufgabe
Swipe to start coding
Implement a Comparator
to sort the list of employees
based on the specified criteria.
- Sort the employees by years of experience in ascending order, and then apply the
reversed()
method to make the order descending. - If the years of experience are the same, sort the employees with the same experience by
salary
in descending order. - If both experience and salary are the same, sort by
name
in alphabetical order. - Use the created comparator as an argument for the
sort()
method to sort the employee list. - Print the sorted list of employees.
Lösung
solution.java
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 10
single
Awesome!
Completion rate improved to 2.33
Challenge: Sorting Employees
Swipe um das Menü anzuzeigen
Aufgabe
Swipe to start coding
Implement a Comparator
to sort the list of employees
based on the specified criteria.
- Sort the employees by years of experience in ascending order, and then apply the
reversed()
method to make the order descending. - If the years of experience are the same, sort the employees with the same experience by
salary
in descending order. - If both experience and salary are the same, sort by
name
in alphabetical order. - Use the created comparator as an argument for the
sort()
method to sort the employee list. - Print the sorted list of employees.
Lösung
solution.java
War alles klar?
Danke für Ihr Feedback!