public int compare(Employee emp1, Employee emp2) {
if(emp1==null || emp1==null ){
throw new UnsupportedOperationException("Not an Employee instance");
}
if(emp1.getEmpid()<emp2.getEmpid()){
return -1;
}
else if(emp1.getEmpid()>emp2.getEmpid()){
return 1;
}
return 0;
}