?? testlist.java
字號:
import java.util.*;
public class TestList{
public static void main(String[] args) {
ArrayList h = new ArrayList();
h.add("1st");
h.add("2nd");
h.add(new Integer(3));
h.add(new Double(4.0));
h.add("2nd"); // 重復元素, 加入
h.add(new Integer(3)); // 重復元素,加入
m1(h);
}
public static void m1(List s){
System.out.println(s);
}
}
//本應用程序輸出結果如下[1st, 2nd, 3, 4.0, 2nd, 3
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -