In this Question I read the following:
If you're doing comparatively few operations, ie less than 1000 or so enqueue/dequeues in total, then an array would be faster because it is contiguous in memory.
My question is: How caching an ArrayList works in Java? Are there cases, when an ArrayList implemented Queue or Stack perform better then a LinkedList implemented in Java?