ArrayList及HashMap的扩容规则

一、ArrayList 默认大小为10 /** * Default initial capacity. */ private static final int DEFAULT_CAPACITY = 10; 最大容量为2^30 - 8 /** * The maximum size of array to allocate. * Some VMs reserve some header words i
相关文章
相关标签/搜索