- 博客(4)
- 收藏
- 关注
原创 LinkedList
LinkedList是基于双向链表来实现的, 众所周知, 链表的增/删性能优秀而读/取较为复杂。初始化构造器 public LinkedList(){}增删读取复杂度
2017-09-20 17:28:53
142
原创 ArrayList
初始化过程构造器 /** * Constructs an empty list with an initial capacity of ten. */ public ArrayList() { this.elementData = DEFAULTCAPACITY_EMPTY_ELEMENTDATA; } transient Objec
2017-09-19 23:00:55
249
原创 String类
String类其实是对一个char[] 数组的封装。底层数组 private final char[] value; private int hash; //default 0; public String(String original) { //constructor this.value = original.value; this.h
2017-09-18 22:04:48
284
原创 HashMap简单实现
HashMap的底层实现HashMap可以看成是一个 `数组+链表/红黑树` 组合成的数据结构。HashMap,HashTable,ConcurrentHashMap是基于hash表的实现,HashTable和HashMap在代码实现上,基本上是一样的,和Vector与Arraylist的区别大体上差不多,一个是线程安全的,一个非线程安全。ConcurrentHashMap也是线程安全的
2017-09-11 22:32:44
559
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人