package com.ylw.jdk.hashmap; public class ExtHashMap<K, V> implements ExtMap<K, V> { // 1.定义table 存放HasMap 数组元素 默认是没有初始化容器 懒加载 Node<K, V>[] table = null; // 2. 实际用到table 存储容量 大小 int size; // 3.HashMap默认负载因子,负载因子越小,hash冲突机率越低, 根据每个链表的个数 float DEFAULT_LOAD_FACTOR = 0.5f; // 4.table默认初始大小 16 static int DEFAULT_INITIAL_CAPACITY = 16; // 16 public V put(K key, V value) { // 1.判断table 数组大小是否为空(如果为空的情况下 ,做初始化操作) if (table == null) { table = new Node[DEFAULT_INITIAL_CAPACITY]; } // 2.