1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

230 Commits

Author SHA1 Message Date
Wenweigood
7980d03265
集合转Map抛出异常的常见情形提醒 2025-05-13 19:57:42 +08:00
Guide
7c6e03dd21 [docs update]typo 2025-03-07 23:18:46 +08:00
Guide
d11cfa5387 [docs update]完善补充HashMap、并发集合相关的内容 2024-12-29 13:24:22 +08:00
Huang-Yijing
21ea70c0eb
Update linkedlist-source-code.md 2024-12-09 23:01:36 +08:00
Wick Dynex
e54f5ea964
Translate English comment 2024-11-18 21:00:34 +08:00
Guide
352d298082 [docs update]部分内容更新完善 2024-11-18 16:52:47 +08:00
shark-chili
6f224aef93 [docs update] 说说fail-fast和fail-safe是什么 2024-11-17 23:54:02 +08:00
HoeYeung Ho
3453b2f0e8
更新 ConcurrentHashMap 1.7 扩容存在两次 for 循环的原因 2024-11-09 18:11:11 +08:00
HoeYeung Ho
9bdb5f6b84
更新《集合判空》的例子
使用 `ConcurrentLinkedQueue` 作为例子,并完善 `ConcurrentHashMap` 的相关表述。
2024-11-09 18:03:18 +08:00
shenfc6
d4cbc98bd6
bug_fix: arrayblockingqueue-source-code.md 2024-11-05 19:47:54 +08:00
Samsara1994
9145feec50
Update linkedhashmap-source-code.md
错别字更改
2024-09-25 14:56:25 +08:00
Mr.Hope
70819c92cb feat: bump deps 2024-09-24 00:09:56 +08:00
Guide
1c404b8340 [docs update]typo 2024-09-20 11:02:10 +08:00
chaobk
394043949e LinkedList指定位置插入/删除,遍历平均元素应该是n/4个元素
因为本身就有头尾指针,遍历元素的时候会从最近的指针出发,最多会遍历n/2个元素,平均应该是n/4。Java8源码片段如下:

    Node<E> node(int index) {
        // assert isElementIndex(index);

        if (index < (size >> 1)) {
            Node<E> x = first;
            for (int i = 0; i < index; i++)
                x = x.next;
            return x;
        } else {
            Node<E> x = last;
            for (int i = size - 1; i > index; i--)
                x = x.prev;
            return x;
        }
    }
2024-09-08 22:38:00 +08:00
Guide
c0535df01c [docs update]完善HTTP/2.0 和 HTTP/3.0 的对比 2024-08-13 16:01:02 +08:00
Guide
af341e3b05 [docs update]完善回答HashMap 的长度为什么是 2 的幂次方 2024-08-11 15:33:02 +08:00
Guide
e29ad07899 [docs update]内容完善 2024-08-10 20:38:10 +08:00
Guide
4acc22c947
Merge pull request #2440 from WindLYLY/main
Update arraylist-source-code.md
2024-07-30 09:36:42 +08:00
WindLY
e305618723
Update arraylist-source-code.md 2024-07-29 16:53:10 +08:00
WindLY
979800a553
Update java-collection-questions-02.md 2024-07-29 11:30:49 +08:00
Guide
f537c8a3fc Update java-collection-questions-02.md 2024-07-05 16:52:36 +08:00
TimeFFF
2b859fd768
Update linkedlist-source-code.md
修改了“在指定元素之前插入元素”代码注释,原有注释对链表状态描述有误
2024-06-25 18:56:12 +08:00
Guide
3710aec7af [docs add]新增并发面试题:线程池的核心线程会被回收吗? 2024-06-03 20:49:54 +08:00
yqq
64cbe0833c
Update linkedhashmap-source-code.md
一些细节的改动
2024-05-27 23:14:37 +08:00
Mr. Confidence
f87f16a081
Update java-collection-questions-02.md
注释,由 “如果链表元素个数大于等于TREEIFY_THRESHOLD(8)” 改为“如果链表元素个数大于TREEIFY_THRESHOLD(8)”。
个人认为,等于8时,并没有考虑转红黑树。
2024-05-13 22:43:12 +08:00
Zzr-rr
be55c433c0 concurrencyHashMap源码分析错别字勘误 2024-05-06 16:47:03 +08:00
Guide
52cce06e41 [docs update]补充完善消息队列应用场景&spi机制 2024-04-30 10:02:33 +08:00
TedLau
090becd595
修改LinkedList删除元素部分表述
删除时,“遍历”应该要比“移动”更加合适一点。
2024-04-22 10:27:59 +08:00
Guide
00f612ee12 [docs update]部分描述完善 2024-04-04 16:11:39 +08:00
TymGitHub
1aa88848a2
LinkedHashMap勘误
fix:修改了LRU部分测试代码中for循环起点,如果从0开始和下面代码对不上,同时多加一条数据,且修改了下方描述部分,改为【从输出结果来看,由于缓存容量为 3 ,因此,添加第 4 个元素时,第 1 个元素会被删除。添加第 5 个元素时,第 2 个元素会被删除。
】。
2024-04-01 22:21:25 +08:00
Guide
5cc5c9aff1 [docs update]举了个例子来解释消息队列解耦 2024-03-24 11:53:53 +08:00
Guide
5d86986064 [docs update]修正内容格式 2024-03-23 15:51:13 +08:00
Zhao Xu Kun
0e843450d5
Update java-collection-questions-02.md
解释实现 NavigableMap 接口让 TreeMap 具备元素搜索能力原理
2024-03-23 15:15:01 +08:00
Feng Wei
2eae558109
Update arrayblockingqueue-source-code.md
offfer ——> offer
2024-03-09 13:52:21 +08:00
Guide
2954d17e5f [docs fix]一些小错误 2024-03-08 17:06:57 +08:00
Feng
b91315052e
Update java-collection-questions-01.md 2024-03-01 16:17:02 +08:00
首席复制粘贴委员会技术专家
52af79d407
Update linkedlist-source-code.md
修改了一处拼写错误, 将 'fals' 改正为 'false'.
2024-02-13 07:58:51 +08:00
Guide
37a51a0e6f [docs add&update]新增内容访问网页的全过程(知识串联)&部分内容描述完善 2024-01-29 22:06:19 +08:00
Guide
bb5e4cd5e7 [docs update]新增网络面试题:SSE 与 WebSocket 有什么区别?+ 修正LinkedBlockingQueue的描述 2024-01-23 08:35:44 +08:00
aucub
dc0593be9b [docs fix]修复拼写错误 2024-01-13 15:00:49 +08:00
Guide
b5f8894c70 [docs fix]修正链接错误&基本类型和包装类型的区别 2024-01-11 23:37:21 +08:00
Mr.Hope
f9a11d3399 chore: update deps 2023-12-30 17:14:13 +08:00
Guide
8c20a9b3e9 [docs update&fix]开源项目推荐完善&修复RocketMQ面试题图片问题 2023-12-21 14:15:20 +08:00
Mr.Hope
7ea99a88d7 style: update linter 2023-10-27 06:44:02 +08:00
Guide
7df1cf17e6 [docs fix]部分笔误修正 2023-10-15 19:36:32 +08:00
Guide
6469d6c097 [docs update]markdown格式规范 2023-10-08 16:33:50 +08:00
Guide
5782cb1851 [docs add]Maven最佳实践 2023-09-15 21:14:19 +08:00
cxhello
4e5f88d89d
Update delayqueue-source-code.md 2023-09-01 11:31:03 +08:00
cxhello
c7c4b3112f
Update linkedhashmap-source-code.md 2023-08-31 16:58:33 +08:00
Guide
a44d19e35c [docs fix]LinkedHashMap树化阈值修正 2023-08-28 16:07:09 +08:00