title: Why casting direction is big to small in primitive types and small to big with objects?
body: <p>In Java 
  we need casting when converting double(big in memory size) to Integer (smaller in memory size) </p>
  
  <pre><code>int x = (int) 4.3;
  </code></pre>
  
  <p>But in case of objects if parent class is "Mammal"(small in memory size) and its subclass is "Human" (big in memory size since got more properties then mammal)</p>
  
  <p>then </p>
  
  <pre><code>Mammal m = new Human(); //works without casting
  </code></pre>
  
  <p>but small to big conversion</p>
  
  <pre><code>Human h = (Human) m ; // needs casting 
  </code></pre>
  
  <p>Thanks in Advance.</p>