数组练习 fill sort

 

package day05;


import java.util.Arrays;

//fill sort equals
public class testArrays {
    public static void main(String[] args) {
        //print arrays' elements
        int[] arrays = new int[4];
        arrays[0]=1;
        arrays[3]=4;
        System.out.println(Arrays.toString(arrays));
        for(int e :arrays){
            System.out.print(e+" ");

        }
        System.out.println();

        //sort arrays' element
        Arrays.sort(arrays);
        System.out.println(Arrays.toString(arrays));

        //fill the arrays
        Arrays.fill(arrays,1,3,666);
        System.out.println(Arrays.toString(arrays));

    }
}

 

上一篇:[trustzone]-ARM Trustzone架构下的软件框图


下一篇:绘制五角星代码