I want to make a comparator class that implements the comparator interface. In the class I want to compare 2 of my employee objects based on their ID. The employee class that I have made so far is:
import java.util.ArrayList;
public class Employee {
public int ID_Number;
public String Full_Name;
public double Salary;
static ArrayList<Object> employ = new ArrayList<Object>();
Employee(int id, String name, double sal){
ID_Number = id;
Full_Name = name;
Salary = sal;
}
}
I'm totally stuck on this and don't have any idea what to do. Can anybody help?