title: Does a SubClass object in an ArrayList<SuperClass> keep methods unique to SubClass?
body: <p>Basically what the title says, but some elaboration. I have a SuperClass with a couple of SubClasses. I needed an ArrayList to hold both types of Subclasses so hence the ArrayList of type SuperClass. I tried to access Subclass1's <code>getQuantity()</code> method using <code>ArrayList.get(0).getQuantity();</code> (assuming that index 0 is of type SubClass1). I get the error: getQuantity is undefined for the type SuperClass.</p>
  
  <p>Do the SubClass objects not keep their properties when put into a SuperClass ArrayList? And if they do keep their properties, how do I access them?</p>