摘要:
源码分析 public ArrayList() {. //默认构造函数,若初始值指定为null则将赋值为一个空的数组 this.elementData = DEFAULTCAPACITY_EMPTY_ELEMENTDATA; } private static final Object[] DEFAU 阅读全文
posted @ 2019-11-18 20:34
神奇海螺。
阅读(180)
评论(0)
推荐(0)
摘要:
1. HashSet是使用HashMap来实现的 public HashSet() { map = new HashMap<>(); } private transient HashMap<E,Object> map; // Dummy value to associate with an Obje 阅读全文
posted @ 2019-11-18 20:20
神奇海螺。
阅读(144)
评论(0)
推荐(0)
摘要:
1. 先来看一下类构成 public interface Executor { //顶级接口Executor,定义了线程执行的方法 void execute(Runnable command); } public interface ExecutorService extends Executor 阅读全文
posted @ 2019-11-18 20:05
神奇海螺。
阅读(739)
评论(0)
推荐(0)
摘要:
1. 先来了解ConcurrentHashMap中的几个成员,当然大多数与HashMap中的相似,我们只看独有的成员 /** * The default concurrency level for this table, used when not * otherwise specified in 阅读全文
posted @ 2019-11-18 11:22
神奇海螺。
阅读(254)
评论(0)
推荐(0)

浙公网安备 33010602011771号