Hi,
I had been to an interview and they asked me this question.
Employee class has an arrayList of Employee Object with id (long), name(Sting), lname(string).
Employee class will not extend comparable or comparator.
There is a Test class which has 2 methods which will takes empList as argument.
First method should remove duplicate objects (duplicate with respect to id) fom array List
Second method should sort empList array on first name.
Could you please guide me how to implement these 2 methods.