I realize that LinkedList
in Java implements Queue
interface (via: Deque
), in addition to implementing List
interface.
Refer below, the snippet is taken from Javadoc:
Why it is designed this way, that is, it is Queue
as well as a List
? So does it mean a LinkedList
is both a Queue
as well as List
?