HashSet底层由HashMap实现
Hash表:存放链表表头的数组
HashSet的值存放于HashMap的key上,而HashMap的value统一为PRESENT(private static final Object PRESENT = new Object();)
HashSet底层由HashMap实现
Hash表:存放链表表头的数组
HashSet的值存放于HashMap的key上,而HashMap的value统一为PRESENT(private static final Object PRESENT = new Object();)
转载于:https://www.cnblogs.com/joshua-aw/p/6011840.html