Reputation: 33
Which is the most elementary queue in java. I just need enqueue and dequeue operations. My application is not concurrent. I find lot of confusing queue names here.
Upvotes: 3
Views: 481
Reputation: 167911
java.util.LinkedList
is the simplest.
java.util.ArrayDeque
is the fastest.
Though it doesn't apply to you, java.util.concurrent.ConcurrentLinkedQueue
is the most bullet-proof in that you can have multiple threads all talking to it at the same time without worry.
Upvotes: 6