title: How many objects are created in the memory runtime?
body: <p>I'm studying for 1z0-803 Java certificate exam at the moment. We have to find out, how many instances of <code>MarkList</code> are created in this application:</p>
  
  <pre><code>public class MarkList {
     int num;
  
     public static void graceMarks(MarkList obj4) {
         obj4.num += 10;
     }
  
     public static void main(String[] args) {
         MarkList obj1 = new MarkList();
         MarkList obj2 = obj1;            
         obj2.num = 60;
         graceMarks(obj2);
      }
  }
  </code></pre>
  
  <p>A friend of mine said that in this question the answer is two objects. I think it's only one (<code>obj1</code>), though I may be wrong since I'm new with Java but have some experience with C#.</p>