📄 arraylisttest.java
字号:
package sample;
import java.util.*;
public class ArrayListTest {
public static void main(String[] args) {
List l = new ArrayList();
l.add(new Integer(1));
l.add(new Integer(4));
l.add(new Integer(3));
l.add(new Integer(2));
Iterator it = l.iterator();
while(it.hasNext()){
int i = ((Integer)it.next()).intValue();
System.out.println("Element in list is: " + i);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -