/**
-
System系统类:
-
代表的是操作系统.
-
常用的方法:
-
currentTimeMillis()方法:获取当前的时间毫秒值。
-
arraycopy()方法:将数组指定的数据拷贝到另一数组中。
-
参数1:被复制的数组。
-
参数2:从哪个索引位置开始复制。
-
参数3:目标数组。
-
参数4:从目标数组哪个索引开始放。
-
参数5:复制几个数组。
-
exit()方法:参数是0说明是正常退出!!(退出JVM虚拟机。强制性!!)。
-
*/
public class Dome05 {public static void main(String[] args) {
//获取时间毫秒值; long timer=System.currentTimeMillis(); System.out.println(timer); int arrs[]={2,3,4,5,6,7,8,9,12,10,11}; int arry[]=new int[6]; //将指定数组的数据复制到另一数组中; System.arraycopy(arrs,1,arry,1,4); //打印数组; System.out.println(Arrays.toString(arrs)); System.out.println(Arrays.toString(arry));
}
}