![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javase
红豆觅朱阁
浮舟沧海,立马昆仑。
展开
-
集合-List接口的特点和List接口带索引的方法
集合List接口List接口的特点有序集合具有索引允许存储重复元素实现类:ArrayList LinkedList Stack VectorList接口带索引的方法public static void main(String[] args){//创建list接口List<String> list=new ArrayList<String>();list.add("你好");list.add("李焕英");list.add("你好");list.原创 2021-07-28 19:39:04 · 212 阅读 · 0 评论 -
Java集合中常用的方法
集合集合概述集合是一个存储数据的容器,大小不固定。集合的根接口是Collection集合中通过泛型明确集合中元素数据的类型,泛型中只能写引用数据类型,所以集合中只能存储引用数据类型。集合中常用的方法public class CollectionDemo{ public static void main(String[] args){ //定义接口 Collection<String> coll = new ArrayList<String>()原创 2021-07-26 20:10:23 · 209 阅读 · 0 评论