packagecom.itheima.d1_collection;importjava.util.ArrayList;importjava.util.Collection;importjava.util.HashSet;/**目标:明确Collection集合体系的特点*/publicclassCollectionDemo1 {publicstaticvoidmain(String[] args) {// 有序 可重复 有索引 List家族Collection list =newArrayList(); list.add("Java"); li...
package com.itheima.d6_map_traversal; import java.util.*; public class MapDemo { public static void main(String[] args) { //1添加元素:无序,不重复,无索引 Map<String , Integer> maps = new HashMap<>(); maps.put("iphoneX" , 10); maps.put("娃娃" , 20); maps.put("iphoneX" , ...