Drucken Sie die Warteschlange in Java aus

Queue<Something> yourQueue=new LinkedList<>();//or similar
System.out.println(yourQueue);//print it in a single line

//print manually
for(Something elem:yourQueue){
	System.out.println(elem);
}
dan1st