package com.tedu.day1302;
import java.util.ArrayList;
import java.util.Collection;
public class Study_Collection {
public static void main(String[] args) {
//创建集合
Collection<String> c1 = new ArrayList<String>();
c1.add("刘德华");
c1.add("郭富城");
c1.add("张学友");
c1.add("黎明");
System.out.println(c1.toString());
System.out.println("-----------------------------");
System.out.println(c1.contains("aaa"));
System.out.println(c1.remove("刘德华"));
c1.clear();
System.out.println(c1);
}
}
标签:java,System,println,add,集合,c1,out
From: https://www.cnblogs.com/ch2020/p/16864598.html