publicclassTest { publicstaticvoidmain(String[] args) { /** * src – the source array.原数组 srcPos – starting position in the source array.在原数组的开始位置 dest – the destination array.目标数组 destPos – starting position in the destination data.在目标数组的开始位置 length – the number of array elements to be copied从原数组拷贝多少个数 */ int a[] = {1, 2}; int b[] = newint[10]; System.arraycopy(b, 0, a, 0, 2); System.out.println(Arrays.toString(b)); //获取当前时间到1970.1.1的时间,毫秒为单位 //the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. long time=System.currentTimeMillis(); System.out.println(time); System.exit(0); } }