Java对可重复的数组排序后得到索引

public class ccjceshi {
    public static void main(String[] args) {
        int[] b = {0,0,2,1,1,2};
        int[] bcopy = new int[b.length];
        for (int i = 0; i < b.length; i++) {
            bcopy[i] = b[i];
        }
        Arrays.sort(bcopy);
        System.out.println("排序之前的序列为:" + Arrays.toString(b));
        System.out.println("排序之后的序列为:" + Arrays.toString(bcopy));


        for (int i = 0; i 

 

你可能感兴趣的:(Java学习)