摘要: 写之前先看下 ArrayList 子函数 contains 的Api 怎么介绍: boolean contains(Object o) 如果此列表中包含指定的元素,则返回 true。 先看个字面意思过过眼就好了 哈哈哈 然之后 我们上实例见 问题:(详看注释) import java.util.Ar 阅读全文
posted @ 2021-04-17 21:08 咸瑜 阅读(135) 评论(0) 推荐(0)
摘要: public class Main { public static void main(String[] args) { test test = new test(); test.xxx(new zi()); } } class fu{ public void x(){ System.out.pri 阅读全文
posted @ 2021-04-17 19:34 咸瑜 阅读(65) 评论(0) 推荐(0)
摘要: List两个子类的特点 List的两个子类的特点 因为两个类都实现了List接口,所以里面的方法都差不多,那这两个类都有什么特点呢? ArrayList: 底层数据结构是数组,查询快,增删慢。 LinkedList: 底层数据结构是链表,查询慢,增删快。 这个两个个子类有什么区别和共同点? Arra 阅读全文
posted @ 2021-04-17 19:21 咸瑜 阅读(103) 评论(0) 推荐(0)
摘要: 參考文獻:https://www.jianshu.com/p/f3f6b12330c1 文獻来源:简书 关键字: Java Exception遇到异常信息Exception in thread "main" java.util.ConcurrentModificationException。 假设我 阅读全文
posted @ 2021-04-17 16:40 咸瑜 阅读(313) 评论(0) 推荐(0)