title: Java collections. Why no Primitive Types?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2504959/storing-primitive-values-in-a-java-collection">storing primitive values in a java collection?</a>  </p>
  </blockquote>
  
  
  
  <p>My Java textbook says elements of a collection, for example ArrayList, cannot be primitive types. Is there a reason for this? I mean did someone at Sun decide on this or is there some barrier against doing it? I understand my example half-answers my question since ArrayList requires an object and primitives are not objects. But then I think why can't they have primitive types as well? </p>