![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java基础
那一夜,我也曾梦见百万雄兵。
每一个不曾起舞的日子,都是对生命的辜负!
展开
-
List 排序
实现 实体实现 Comparable 接口public class Example implements Comparable <Example> { private String name; private Integer age; public Example(String name, Integer age) { this.name = name; this.age = age; } @Override.原创 2020-08-19 23:45:31 · 81 阅读 · 0 评论 -
HashMap五种迭代方式
HashMap五种迭代方式Iterator 遍历 HashMap EntrySetIterator 遍历 HashMap KeySetFor-each 循环遍历 HashMap使用 Lambda 表达式遍历 HashMapStream API 遍历 HashMapIterator 遍历 HashMap EntrySet /** * 使用 Iterator 遍历 HashMap EntrySet */ public static void iterateEntrySetE原创 2020-07-06 17:22:52 · 431 阅读 · 0 评论