Add tests for NodeStack (#6009)

This commit is contained in:
Giulio Tantaro
2024-10-27 21:39:56 +01:00
committed by GitHub
parent a1638165fe
commit a2e526b610
3 changed files with 7 additions and 24 deletions

View File

@ -95,15 +95,4 @@ public class NodeStack<Item> {
public int size() {
return size;
}
/**
* Prints the contents of the stack from top to bottom.
*/
public void print() {
Node current = head;
while (current != null) {
System.out.println(current.data);
current = current.previous;
}
}
}