M Sach M Sach - 22 days ago 5x
Java Question

Linked list implementation in java?

As per my understanding linked list implementation in java based on double ended linked list not on Doubly linked list (as we dont have any method going backward). Though I can see the method descendingIterator which takes us backward. Not sure we should call it Doubly linked list implementation?


LinkedList actually satisfies two interfaces: the simple List and the double-linked Deque. So it can do both, depending on how you use it.

(Internally, it does keep references of previous and next element. So it is doubly linked if you want to call it like this.)