package com.jiateng.Demo03;
import java.util.Arrays;
public class MySystem01 {
public static void main(String[] args) {
int[] a={29,23,23,23,4,3,45,642,};
int[] ints = new int[8];
//arraycopy:数组的复制
//src:原数组 srcpos:从哪个位置开始 dest:目标数组 dest:目标数组的位置 length:changdu
//Arrays.copyOf里面用的就是System.arraycopy(有c和c++实现,效率高)
System.arraycopy(a,0,ints,0,a.length);
System.out.println(Arrays.toString(ints));
//System.currentTimeMillis();获取1970年至现在的毫秒数
long l = System.currentTimeMillis();
for (int i = 0; i < 999999999; i++) {
for (int j = 0; j < 99999999; j++) {
i=i+j;
}
}
long l1 = System.currentTimeMillis();//计时
System.out.println("循环用时为:"+(l1-l)+"毫秒");
//System.exit()退出jvm
System.exit(0);
//System.gc回收垃圾
new Studente(90,"aaa");
new Studente(91,"bbb");
new Studente(92,"ccc");
System.gc();
}
}