![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
集合
吴庆森
这个作者很懒,什么都没留下…
展开
-
HashSet的使用
先了解一下 HashSet 的两个特点:1. 无序;2. 不能重复添加下面是一个小栗子: // hashSet 添加数据,特性:1,无序;2,不能重复添加 HashSet<String> hashSet = new HashSet<>(); //创建 HashSet 集合 hashSet.add("111"); /...原创 2018-04-16 09:20:01 · 279 阅读 · 0 评论 -
List 集合的使用
根据小栗子理解 list 集合的使用: List<String> list = new ArrayList<>(); // 创建list集合 list.add("A"); // 往 list 集合中添加 5 条数据 list.add("B"); list.add("C"); list.add...原创 2018-04-16 09:43:31 · 428 阅读 · 0 评论 -
HashMap的使用
直接看一下栗子: HashMap<String, String> hashMap = new HashMap<>(); // 创建一个 HashMap 集合 hashMap.put("name", "李四"); // 往hashMap中添加数据 hashMap.put("sex", "女"); hashMa原创 2018-04-16 10:26:09 · 260 阅读 · 0 评论