antrian cetak di java

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