HashMap如何实现的(手写一个HashMap)
1.原理
2.代码
Map
package com.mapText;
public interface Map<K,V> {
V put(K k,V v);
V get(K k);
int size();
interface Entry<K,V>{//创建一个对象,用于装值
K getKey();
V getValue();
}
}
HashMap
package com.mapText;
原创
2021-04-08 20:22:32 ·
223 阅读 ·
0 评论