package com.sf.day13.compareTest;

import org.junit.Test;

import java.util.Arrays;

public class CompareTest {
    @Test
    public void t1(){
    Worker[] workers = new Worker[3];
    workers[0] = new Worker(1);
    workers[1] = new Worker(3);
    workers[2] = new Worker(2);
        System.out.println(Arrays.toString(workers));
        Arrays.sort(workers,new MyCompare());
        System.out.println(Arrays.toString(workers));
    }
}
