1、不存在线程安全时,查找元素用的多:ArrayList

//默认创建一个ArrayList集合
List list = new ArrayList<>();
//创建一个初始化长度为100的ArrayList集合
List initlist = new ArrayList<>(100);
//将其他类型的集合转为ArrayList
List setList = new ArrayList<>(new HashSet());
ArryList、LinkedList、Vector的不同

2、不存在线程安全时,增加和删除元素用的多:LinkList
具体用法见:
https://blog.csdn.net/qedgbmwyz/article/details/80108618
3、需要线程安全时,用Vector
List a = new Vector();

相关文章:

  • 2021-07-07
  • 2022-03-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-25
  • 2021-05-10
  • 2022-01-07
猜你喜欢
  • 2022-12-23
  • 2022-01-10
  • 2021-04-06
  • 2021-04-24
  • 2021-04-21
  • 2021-04-14
相关资源
相似解决方案