ArrayList有容量上限吗?

今天面试遇到这个问题:java 首先先new一个面试 List<Integer> list =new ArrayList<Integer>(); 调用无参构造函数默认初始容量为10,能够看到list.size()其底层以下:函数 /** * Returns the number of elements in this list. * * @return the num
相关文章
相关标签/搜索