title: Java Generics - <int> to <Integer>
body: <p>In the way of learning Java Generics, I got stuck at a point.<br>
  It was written "<strong>Java Generics works only with Objects and not the primitive types</strong>".  </p>
  
  <p>e.g </p>
  
  <pre><code> Gen&lt;Integer&gt; gen=new Gen&lt;Integer&gt;(88);     // Works Fine ..  
  </code></pre>
  
  <p>But, with the primitive types like int,char etc ...  </p>
  
  <pre><code> Gen&lt;int&gt; gen=new Gen&lt;int&gt;(88) ;    // Why this results in compile time error 
  </code></pre>
  
  <p>I mean to say, since java generics does have the auto-boxing &amp; unboxing feature, then why this feature cannot be applied when we declare a specific type for our class ?</p>
  
  <blockquote>
    <p>I mean,  why <code>Gen&lt;int&gt;</code> doesn't
    automatically get converted to
    <code>Gen&lt;Integer&gt;</code> ?</p>
  </blockquote>
  
  <p>Please help me clearing this doubt.<br>
  Thanks.</p>