当前位置:网站首页>6. What is the difference between Vector, ArrayList and LinkedList?(design, performance, safety)
6. What is the difference between Vector, ArrayList and LinkedList?(design, performance, safety)
2022-08-03 06:10:00 【Shiyu】
All implement the list interface, providing corresponding methods for adding, getting, and deleting objects, etc.
One, low-level design implementation, security, performance
Vector: The low-level implementation is implemented with an array, which is thread-safe, but inefficient. It is suitable for use in multiple threads, often reads objects, and uses less insertion and deletion.
ArrayList: The low-level implementation is implemented using an array, which is thread-unsafe and efficient. It is suitable for use in a single thread, often reads objects, and uses less insertion and deletion.
LinkedList: The low-level is implemented by a doubly linked list, which is not thread-safe and is suitable for reading less, frequently inserting and deleting objects.
Second, initial value, expansion multiple and expansion factor
Vector: 10 size+size*0.5+1= size*1.5+1 1
ArrayList: 10 size+size*1= 2*size 0.75
LinkedList: No expansion required, linked list implementation, dynamic expansion.
边栏推荐
猜你喜欢
随机推荐
交叉熵(第六周)
深度学习理论课程第八、九、十章总结
c#,.net 下载文件 设置断点
微信小程序 自定义tabBar
九、请介绍类加载过程,什么是双亲委派模型?
JSP的基本使用
卷积神经网络入门
Qlik Sense 临时处理表数据详解(Resident)
Qlik Sense 字符串截取和拼接详解(Left、Right、&)
VCC(电源)和 GND(地)之间电容的作用
电子元器件之电子变压器可分为哪几类?
ZEMAX | 如何使用ZOS-API创建自定义操作数
ucos任务调度原理
cmdline -[command line,__fdt_pointer,initial_boot_params] boot_command_line 获取
new / malloc / delete / free之间的区别
MySQL 下载和安装详解
常见的电子元器件分类介绍
@JsonProperty和JSONField的区别?
servlet学习(七)ServletContext
采用Trench肖特基二极管,实现功率密度的显著提升









