title: Multiple Types of Objects in Java containers
body: <p>I am learning about generics in Java, and was wondering if this would be considered poor coding. </p>
  
  <p>If I declare an <code>ArrayList&lt;Object&gt;</code> I know that I can put any type of object into this list, as all objects descend from Object. I also know that when I call <code>ArrayList.remove(index)</code> the object that gets taken out of the array is of type Object, and that I need to typecast it to the type of object that I want to use. </p>
  
  <p>Now suppose I have object of <code>Dog</code>, <code>Cat</code>, and <code>Car</code>. Would it be bad to put all three objects into the array, considering they are not similar classes?</p>