package com.lovecoding.day12.ex02;

import java.util.Comparator;

public class SalaryComactor implements Comparator {
    @Override
    public int compare(Object o1, Object o2) {
        Employee employee1 = (Employee) o1;
        Employee employee2 = (Employee) o2;
        //salary
        return employee1.getSalary().compareTo(employee2.getSalary()) ;
    }
}
