An Online Tool for viewing memory and output as a Java program executes
General Info | Getting StartedIt is important for students to understand how different Java statements are executed, the output produced, and how they change the contents of memory while a program is running. The good folks at University of Waterloo have developed a tool that does just that for Java programs.
CS 302 students can paste code fragments into the form and then execute the program one statement at a time and view a simplified diagram of memory. By doing this you can visualize how memory changes and hopefully understand why your code produces the results that it does. This will also help you correctly trace your code and knowing how to accurately trace code statements is a critical skill for all programmers.
Try it today at: http://cscircles.cemc.uwaterloo.ca/java_visualize/
Java Visualizer is available to you anywhere you have access to the internet. Registration is not required, but you can track your progress while learning Python from their site if you do register: http://cscircles.cemc.uwaterloo.ca which has a nice Python tutorial. This is not an endorsement.
System.out.println( "Welcome to Java Visualizer.\n" );
Here are some simple programs to visualize: