CS 27500 - Java memory Model

Here is an illustration of the memory map for the following DrJava Interaction Pane session, which makes use of the Java class SimpleClassWithState. This picture shows what Java's memory would look like at the end of the execution of these lines of code.

   > SimpleClassWithState obj1
   > SimpleClassWithState obj2
   > obj1 = new SimpleClassWithState()
   > obj2 = new SimpleClassWithState()
   > obj1.increaseState()
   > obj2.increaseState()
   > obj1.increaseState()
   > int n = obj1.reportState()