import java.util.*;
public class TestArrayList{
public static void main(Stringl] args){
ArrayList al = new ArrayList();
al.add("java");
al.add("python");
al.add("C++");
al.add("C#");
al.add("python");
print("the first time="+al);
public static void print(Object obj){
System.out.println(obj);
程序运行的结果:(1)_________
打印 the first time=[java, python, C++, C#, python]
谢谢
ArrayList<String> al = new ArrayList<>();
谢谢