In a one liner:
new LinkedList<>(myQueue);
Since Queue extends Collection
, and collections have a constructor that takes another Collection
, this is a quick way to do a shallow clone.
Substitute LinkedList
with your own Queue
implementation if you wish.
Also, read the javadocs. They have all the answers.