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

Merge pull request #2258 from visitor23/main

Update linkedlist-source-code.md
This commit is contained in:
Guide 2024-02-15 21:00:07 +08:00 committed by GitHub
commit 3fd08c34a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -250,7 +250,7 @@ public E removeLast() {
return unlinkLast(l);
}
// 删除链表中首次出现的指定元素,如果不存在该元素则返回 fals
// 删除链表中首次出现的指定元素,如果不存在该元素则返回 false
public boolean remove(Object o) {
// 如果指定元素为 null遍历链表找到第一个为 null 的元素进行删除
if (o == null) {