摘要:
1.1 Set.add方法——向Set集合添加对象 public static void main(String[] args) { Set set = new HashSet(); //定义Set集合对象 set.add(new Date()); //向集合中添加日期对象 set.add("app 阅读全文
摘要:
1.1 Map.clear方法——从Map集合中移除所有映射关系 public static void main(String[] args) { Map map=new HashMap(); //定义Map集合 map.put("昨天", "定制目录"); //向集合中添加元素 map.put(" 阅读全文
摘要:
1.1: List.add方法——向集合列表中添加对象 public static void main(String[] args) { List<String> list=new ArrayList<String>(); list.add("保护环境"); //向列表中添加数据 list.add( 阅读全文