//System类
public class Demo13 {
public static void main(String[] args) {
int[] src = {66,54,33,55,66,88,99,22,16,99};
int[] dest = new int[10];
//arraycopy 复制数组
System.arraycopy(src,2,dest,2,5);
for (int i = 0; i < dest.length; i++) {
System.out.println(dest[i]);
}
//currentTimeMillis 获取毫秒数
long start = System.currentTimeMillis();
for (int i = -999999999; i < 999999999; i++) {
for (int j = -999999999; j < 999999999; j++){
int result = j+i;
}
}
long end = System.currentTimeMillis();
System.out.println("用时:"+(end-start));
//exit 退出jvm 0正常退出
System.exit(0);
System.out.println("没有退出");
}
}
运行结果:
0
0
33
55
66
88
99
0
0
0
用时:5