Elementary Queue in java
Which is the most elementary queue in java. I j开发者_开发技巧ust need enqueue and dequeue operations. My application is not concurrent. I find lot of confusing queue names here.
LinkedList is the most basic.
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.
精彩评论