title: java dynamic memory allocation?
body: <p>Why is an object initialization using the <code>new</code> keyword called dynamic memory allocation, since compile time itself we need to know the memory needed for that object. </p>
  
  <p>Also please explain what happens when you do <code>ClassA object = new ClassA();</code> in <em>heap</em> and <em>stack</em> .</p>