Java有双向链表实现吗?

Is there any doubly linked list implementation in Java?

我看到 LinkedList 的 JDK 实现内部包含 Node 内部 class,它包含下一个和上一个的地址。

所以我怀疑 java 中的 LinkedList 不是双向链表。如果不是,为什么?

以及如何实现我们自己的双向链表?

是的,LinkedList 是一个双向链表,正如 Javadoc 提到的那样:

Doubly-linked list implementation of the List and Deque interfaces. Implements all optional list operations, and permits all elements (including null).

All of the operations perform as could be expected for a doubly-linked list. Operations that index into the list will traverse the list from the beginning or the end, whichever is closer to the specified index.