开发者

Elementary Queue in java

开发者 https://www.devze.com 2023-01-21 08:38 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消