Most of other answers mention about memory consumption. As far as I understand the story is that, as the number of elements increases, so does the difference between LinkedList and ArrayDeque memory usage to support those elements.
But what happens as the number of elements decreases back to a small amount?
I just wanted to mention this special case, because it seems to me (based on the currently-latest OpenJDK version 24 implementation for example) that the ArrayDeque only grows. When elements are removed, it seems that, the internal array never gets smaller. Thus one could expect that after adding for example 10 million objects and then removing almost all the first elements, leaving for example only 3, then ArrayDeque will have an array of at least 10 million (null) references internally, but LinkedList only 3 nodes (in the corresponding example). I did not test this, but I assume LinkedList would then occupy less memory at that point.
Of course one could argue that such a scenario would be rarely (if at all) needed, or that if you can already fit 10 million references at some point in time, why care when they are deallocated at some other point, etc... But I consider it as a valid scenario because it can happen, as well as a problematic situation since almost all the internal array is occupying unused memory (which is taken away from other processes).
One way to workaround this issue is to clone the ArrayDeque when needed to reduce memory footprint (which cannot happen in place), or use a trimToSize method similar to ArrayList (assuming it gets added in the future). But this could also require to monitor the size of the internal array (assumptions for its internal implementation should be made then by client code, which seems like breaking the whole purpose of encapsulation).
src.zip. It is the archive with the source code of java classes. I strongly recommend to study these classes structure and internals to get better understanding how do java classes work.