Answers for "print queue in java"

0

print queue in 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);
}
Posted by: Guest on April-15-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language