源码
Davionnini
这家伙很懒,什么也没留下
展开
-
HashMap源码阅读
//hash table 的数据结构 static class Node<K,V> implements Map.Entry<K,V> { final int hash; //hash 值 final K key; V value; Node<K,V> next; Node(int hash, K key, V value, Node<K,V> next) { .原创 2020-06-18 09:24:45 · 132 阅读 · 0 评论 -
ArrayList源码阅读
private void grow(int minCapacity) { // minCapacity > 1.5 * oldCapacity ? 使用 minCapacity : 1.5 * oldCapacity int oldCapacity = elementData.length; int newCapacity = oldCapacity + (oldCapacity >> 1); if (newCapacity原创 2020-06-11 23:02:33 · 135 阅读 · 0 评论 -
LinkedList源码阅读
#LinkedList源码阅读 主要介绍几个重要的方法get remove set clone @SuppressWarnings("unchecked") private LinkedList<E> superClone() { try { //调用Object对象里面的clone方法,默认为浅拷贝 return (LinkedList<E>) super.clone(); } catch (原创 2020-06-11 00:02:30 · 154 阅读 · 0 评论