publicclassSystem01{publicstaticvoidmain(String[] args){
System.out.println("ok1");// 0表示程序正常退出
System.exit(0);
System.out.println("ok2");}}//输出
ok1
Process finished with exit code 0
System.arraycopy: 复制数组元素
publicclassSystem02{publicstaticvoidmain(String[] args){int[] src ={1,2,3};int[] dest =newint[3];/**
* Params:
* 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. => 要赋值数组元素的数量
*/
System.arraycopy(src,0, dest,0,3);// [1, 2, 3]
System.out.println(Arrays.toString(dest));}}