I don't think ArrayDeque
is better than LinkedList
. They are different.
ArrayDeque
is faster than LinkedList
on average. But for adding an element, ArrayDeque
takes amortized constant time, and LinkedList
takes constant time.
For time-sensitive applications that require all operations to take constant time, only LinkedList
should be used.
ArrayDeque
's implementation uses arrays and requires resizing, and occasionally, when the array is full and needs to add an element, it will take linear time to resize, resulting the add()
method taking linear time. That could be a disaster if the application is very time-sensitive.
A more detailed explanation of Java's implementation of the two data structures is available in the "Algorithms, Part I" course on Coursera offered by Princeton University, taught by Wayne and Sedgewick. The course is free to the public.
The details are explained in the video "Resizing Arrays" in the "Stacks and Queues" section of "Week 2".