当前位置: 首页 > news >正文

The difference between ArrayList and Vector

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

The difference between ArrayList and Vector
1. synchronization and thread-safe
   Vector is  synchronized while ArrayList is not synchronized.
2. performance
   Vector is slow as it is thread safe . In comparison ArrayList is fast as it is non synchronized.
3. Capacity automatic increase
   A Vector defaults to doubling size of its array. While when insert an element into the ArrayList, it increases its Array size by 50%. By default ArrayList size is 10.
4. increment size
   ArrayList does not define the increment size . Vector defines the increment size.
5. Enumerator
   Other than Hashtable, Vector is the only other class which uses both Enumeration and Iterator. While ArrayList can only use Iterator for traversing an ArrayList.

转载于:https://my.oschina.net/insidesource/blog/537345

相关文章:

  • Android 系统名字、版本、API level的对应关系
  • 高通与TDK投入30亿美元组建合资公司
  • Dreamweaver 网页制作 11月30日
  • mysql generic版本安装配置
  • oracle恢复删除的数据
  • ActionBar第一课简单介绍
  • 让电脑拒绝访问特定网站
  • js继承的实现方法
  • dart系列(四) 动态生成”按钮”元素
  • 中国已超德国 成世界最大光伏发电国家
  • 把数据保存到数据库附加表dede_addon时出错,原因是字段名不合法
  • git的入门摸索和入门研究
  • linux iptables端口映射设置
  • Java内部类的一些总结
  • C/C++中对链表操作的理解实例分析
  • 分享一款快速APP功能测试工具
  • [LeetCode] Wiggle Sort
  • 2017 前端面试准备 - 收藏集 - 掘金
  • Android单元测试 - 几个重要问题
  • Centos6.8 使用rpm安装mysql5.7
  • CODING 缺陷管理功能正式开始公测
  • HomeBrew常规使用教程
  • JavaWeb(学习笔记二)
  • Linux链接文件
  • MySQL的数据类型
  • Odoo domain写法及运用
  • Sequelize 中文文档 v4 - Getting started - 入门
  • Swift 中的尾递归和蹦床
  • Vue.js 移动端适配之 vw 解决方案
  • windows下使用nginx调试简介
  • 阿里云容器服务区块链解决方案全新升级 支持Hyperledger Fabric v1.1
  • 百度贴吧爬虫node+vue baidu_tieba_crawler
  • 闭包--闭包作用之保存(一)
  • 给自己的博客网站加上酷炫的初音未来音乐游戏?
  • 基于Mobx的多页面小程序的全局共享状态管理实践
  • 前嗅ForeSpider中数据浏览界面介绍
  • 如何借助 NoSQL 提高 JPA 应用性能
  • 使用Tinker来调试Laravel应用程序的数据以及使用Tinker一些总结
  • - 语言经验 - 《c++的高性能内存管理库tcmalloc和jemalloc》
  • Java总结 - String - 这篇请使劲喷我
  • 好程序员web前端教程分享CSS不同元素margin的计算 ...
  • 直播平台建设千万不要忘记流媒体服务器的存在 ...
  • ​RecSys 2022 | 面向人岗匹配的双向选择偏好建模
  • ​渐进式Web应用PWA的未来
  • ​什么是bug?bug的源头在哪里?
  • # Swust 12th acm 邀请赛# [ A ] A+B problem [题解]
  • #vue3 实现前端下载excel文件模板功能
  • $ is not function   和JQUERY 命名 冲突的解说 Jquer问题 (
  • (Bean工厂的后处理器入门)学习Spring的第七天
  • (Java数据结构)ArrayList
  • (附源码)springboot 基于HTML5的个人网页的网站设计与实现 毕业设计 031623
  • (附源码)ssm经济信息门户网站 毕业设计 141634
  • (三) diretfbrc详解
  • (三分钟)速览传统边缘检测算子
  • (原创)Stanford Machine Learning (by Andrew NG) --- (week 9) Anomaly DetectionRecommender Systems...