35

深入浅析Java集合及LIst接口-Java老王的博客

 4 years ago
source link: https://blog.51cto.com/14311648/2399854
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
一、集合的概念1.概述:在学习集合前,先回忆一下数组的一个特征---数组有固定的长度,定义一个数组:int[]array=newint[];而针对数据长度可变的情况,产生了集合,java集合就是为了应对动态增长数据,在编译时无法知道具体的数据量而产生的。集合类又叫容器类。2.集合和数组的区别都是容器,数组时固定的长度,集合时可变的;数组存放的数据都是基本数据类型(四类八种)集合存放的数据都是引用数

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK