01-ArrayList
来源:互联网 发布:大数据要学什么 编辑:程序博客网 时间:2024/05/16 11:50
1.ArrayList是一个动态可变容量的数组。
/** * The array buffer into which the elements of the ArrayList are stored. * The capacity of the ArrayList is the length of this array buffer. Any * empty ArrayList with elementData == EMPTY_ELEMENTDATA will be expanded to * DEFAULT_CAPACITY when the first element is added. */ private transient Object[] elementData;
2.ArrayList实例化过程
/** * Constructs an empty list with an initial capacity of ten. */ public ArrayList() { super(); this.elementData = EMPTY_ELEMENTDATA; }
/** * Shared empty array instance used for empty instances. */ private static final Object[] EMPTY_ELEMENTDATA = {};
3.ArrayList的最大容量
/** * The maximum size of array to allocate. * Some VMs reserve some header words in an array. * Attempts to allocate larger arrays may result in * OutOfMemoryError: Requested array size exceeds VM limit */ private static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8;
0 0
- 01-ArrayList
- ArrayList
- ArrayList
- ArrayList
- ArrayList
- ArrayList
- ArrayList
- ArrayList
- ArrayList
- ArrayList
- ArrayList
- ArrayList
- ArrayList
- ArrayList
- ArrayList
- ArrayList
- ArrayList
- ArrayList
- Analysis之后出现的几个内存泄露提示
- 如何判断IP地址是A类B类还是C类
- 代码实现十进制转换为二进制、十六进制(源码)
- Android_android签名证书的sha1值获取
- linux升级glibc基本库的步骤
- 01-ArrayList
- Android3.1后系统接收不到广播的问题解析
- android studio导入PullToRefresh教程
- oarcle sequence用法
- 【Spring实战】—— 9 AOP环绕通知
- 生成openssl客户端密钥时发生的错误的修改
- android下拉刷新精彩动画
- linux静态链接库与动态链接库详解
- 15个 MySQL 基础面试题,DBA 们准备好了吗?