Answers for "how to traverse through stack"

1

how to traverse stack in java

Iterator value = stack.iterator();
// Displaying the values
// after iterating through the stack
System.out.println("The iterator values are: ");
while (value.hasNext()) {
	System.out.println(value.next());
}
Posted by: Guest on September-06-2021

Code answers related to "how to traverse through stack"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language