![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
集合
java大猫
一起交流学习
展开
-
HashMap经典问题分析,面试必备
HashMap分析 基本参数 //序列号 private static final long serialVersionUID = 362498820763181265L; /** * The default initial capacity - MUST be a power of two. 默认初始容量为16 且必须为2的幂。 */ static final int DEFAULT_INITIAL_CAPACITY = 1 << 4; // aka 16 /** * Th原创 2020-10-09 15:51:54 · 156 阅读 · 0 评论 -
ArrayList的源码解析
ArrayList 为什么空实例默认数组有的时候是EMPTY_ELEMENTDATA,而又有的时候是DEFAULTCAPACITY_EMPTY_ELEMENTDATA 为什么elementData要被transient修饰 本文章借鉴自微信公众号三太子敖丙 1.默认参数 // 序列化版本UID` `private static final long` `serialVersionUID = 8683452581122892189L;` `/**` `\* 默认的初始容量` `*/`原创 2020-09-21 10:02:54 · 80 阅读 · 0 评论