package com.sf.day13.compareTest;

import java.util.Comparator;

public class MyCompare implements Comparator {
    @Override
    public int compare(Object o1, Object o2) {
        Worker worker1 = (Worker) o1;
        Worker worker2 = (Worker) o2;
        return worker1.getId()- worker2.getId();
    }
}
