Newer version: try the
Java
visualizer on pythontutor.com, which supports more collection classes,
keyboard input with Scanner, faster performance, and Python, C, C++, and JavaScript.
How can I access Java's built-in Stack/Queue instead of the introcs one? At the top of your program, write import java.util.Stack; — note, import java.util.*; won't work.