Is there a static factory method for creating a queue in Java?
I found several methods for creating Lists. For example:
Arrays.asList(T... a);
or
List.of(E... elements)
But can't find a convenient way to do the same for queues (or dequeues). The only solution I found is:
new LinkedList<>(Arrays.asList(elements))