System类

System类

主要用于获取系统的属性数据和其他操作,构造方法私有

public class Application {
    public static void main(String[] args) throws ParseException {
        //arraycopy:数组的赋值
        //src:源数据
        //srcPos:从那个位置开始复制
        //dest:目标数组
        //destPos:目标的位置
        //length:复制的长度
        int[] arr={1,2,3,4,5,6,7,8,9,0};
        int[] dest = new int[10];
        System.arraycopy(arr,5,dest,0,5);
        for (int i= 0; i<dest.length; i++){
            //System.out.println(dest[i]);
        }
        long start=System.currentTimeMillis();
        for (int i=-999999; i<999999; i++){
            for (int j=-99999; j<99999; j++){
                int result=i+j;
            }
        }
        long end=System.currentTimeMillis();
        System.out.println(end-start);
    }
}

posted @ 2024-08-05 15:57  wen-210162704027  阅读(1)  评论(0编辑  收藏  举报