下面是java中常见的集合:

List--列表:内部元素有序,可以重复,

  ArrayList:线程不安全,效率高。数据结构是线性表,底层结构是顺序表,也就是数组,有唯一的下标来指定元素的位置,查询快,增删慢。

  Vector:类似于ArrayList,但是线程安全,代价就是效率低。完全可以用ArrayList来替代,

  

List<String> list = Collections.synchronizedList(new ArrayList<String>())
View Code

相关文章:

  • 2022-12-23
  • 2021-08-03
  • 2021-09-02
  • 2021-09-30
  • 2021-09-27
  • 2021-11-21
  • 2022-01-06
猜你喜欢
  • 2021-11-19
  • 2021-06-12
  • 2021-12-08
  • 2022-12-23
  • 2021-10-09
  • 2021-05-14
  • 2021-11-02
相关资源
相似解决方案