System類
- exit:退出當前程式,
- arraycopy:復制陣列元素,比較適合底層呼叫,一般使用Arrays.copyOF完成復制陣列,
- currentTimeMillens:回傳當前時間距離 1970-1-1 的毫秒數,
- gc:運行垃圾回識訓制 System.gc();
public class System_ {
public static void main(String[] args) {
// //exit: 退出當前程式
// System.out.println("ok1");
// //1. exit(0) 表示程式正常退出
// //2. 0 表示一個狀態,正常狀態
// System.exit(0);
// System.out.println("ok2");
//arraycopy : 復制陣列元素,比較適合底層呼叫
//一般使用Arrays.copyOf 完成復制陣列
int[] src = https://www.cnblogs.com/zh-Note/p/{1,2,3};
int[] dest = new int[3];// dest 當前是 {0,0,0}
//1. 主要是搞清楚這五個引數的含義
//2.
// 原陣列
// * @param src the source array.
// srcPos:從原陣列的哪個索引位置開始拷貝
// * @param srcPos starting position in the source array.
// dest:目標陣列,即把原陣列的陣列拷貝到這個陣列
// * @param dest the destination array.
// destPos:把原陣列的資料拷貝到目標陣列的哪個索引開始
// * @param destPos starting position in the destination data.
// length:從原陣列拷貝多少資料到目標陣列
// * @param length the number of array elements to be copie.d
System.arraycopy(src,0,dest,1,2);
System.out.println(Arrays.toString(dest));//[0, 1, 2]
//currentTimeMillis:回傳當前時間距離1970年01時01分的毫秒數
System.out.println(System.currentTimeMillis());
}
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/542360.html
標籤:Java
上一篇:學習筆記——SpringMVC訊息轉換器概述;使用訊息轉換器處理請求報文;使用訊息轉換器處理回應報文;使用訊息轉換器處理Json格式資料
