The Employee Comparator Program is a Java application that demonstrates the usage of lambda expressions, sorting with custom comparators, and implementing custom interfaces. The project showcases how to sort and filter data using Java's functional programming features and defines a custom interface for additional functionality.
- Sort Employees by Salary: Uses lambda expressions to sort employees based on their salary.
- Sort Employees by Name: Sorts employees alphabetically by their name.
- Custom Interface (
CustomInfo): Demonstrates the definition and use of a simple custom interface to display additional information about employees.
libPackage:Employee.java: Class representing an employee with attributes for name, age, and salary.EmployeeData.java: Provides a sample list of employees for testing purposes.CustomInfo.java: A custom interface with methods for displaying information.
mainPackage:EmployeeComparatorApp.java: The main class that runs the application and demonstrates sorting and interface usage.
This project serves as a learning tool for understanding the use of lambda expressions, custom comparators, and interfaces in Java. It is designed to help users practice these concepts and apply them to real-world scenarios.