The document defines an EmployeeComparator1 class to represent employees with ID, salary, name, and email attributes. It also defines comparator classes to sort a list of employees by salary, name, and email. The main method creates sample employee objects, adds them to a list, and sorts the list using the different comparator classes to demonstrate sorting based on different attributes.
The document defines an EmployeeComparator1 class to represent employees with ID, salary, name, and email attributes. It also defines comparator classes to sort a list of employees by salary, name, and email. The main method creates sample employee objects, adds them to a list, and sorts the list using the different comparator classes to demonstrate sorting based on different attributes.
The document defines an EmployeeComparator1 class to represent employees with ID, salary, name, and email attributes. It also defines comparator classes to sort a list of employees by salary, name, and email. The main method creates sample employee objects, adds them to a list, and sorts the list using the different comparator classes to demonstrate sorting based on different attributes.
The document defines an EmployeeComparator1 class to represent employees with ID, salary, name, and email attributes. It also defines comparator classes to sort a list of employees by salary, name, and email. The main method creates sample employee objects, adds them to a list, and sorts the list using the different comparator classes to demonstrate sorting based on different attributes.