摘要: 先说结论:接口、抽象类是不可以被new的。 但是今天在写外部比较器Comparator时,我发现有这种写法 // 使用comparator比较器接口 Comparator comparator = new Comparator(){ public int compare(Object o1, Obj 阅读全文
posted @ 2021-07-01 11:30 Peterxiazhen 阅读(1340) 评论(0) 推荐(1) 编辑