title: What happens when multiple calls are placed using new-operator call to Class() in heap?
body: <p>When we make calls like below :-</p>
  
  <pre><code>class Class{
  int x;
  public Class(int a){
   x = a;
  }
  public void display(){
   System.out.println(x);
  }
  }
  </code></pre>
  
  <p>And in main method, then we use the class' object to display data :-</p>
  
  <pre><code>new Class(5).display();    // object 1
  new Class(7).display();    // object 2
  </code></pre>
  
  <p>Now, my question is :-</p>
  
  <blockquote>
    <p>Whether what I've represented from object 1 and object 2 will be equal or
    distinct(in terms of memory locations in heap)? Whether two separate
    memory locations will be created in heap(dynamic memory allocator) OR
    whether the same object(memory location in heap) will be used?</p>
  </blockquote>
  
  <p>I am having this confusion since a long time. Also I am merely a noob in Java.</p>
  
  <p>Please elaborate with respect to the heap section/dynamic memory allocation to Class object using <code>new</code> call.</p>