Elementary queue in java

What is the most elementary queue in java. I just need operations in the queue and deactivation. My application is not simultaneous. I find many confusing queue names here .

+3
source share
2 answers

java.util.LinkedList is the easiest.

java.util.ArrayDeque is the fastest.

Although this does not apply to you, it java.util.concurrent.ConcurrentLinkedQueueis most bulletproof in that you can have multiple threads that all communicate with it at the same time without worrying.

+6
source

LinkedList is the most basic.

+9
source

Source: https://habr.com/ru/post/1771634/


All Articles