title: How to store different types of objects in ArrayList
body: <p>I need to store different objects in the ArrayList. Objects are similar in nature but different and have different methods. </p>
  
  <pre><code>Circle c = new Circle();  
  Cube s = new Cube();
  Piramid p = new Piramid();
  ArrayList&lt;?&gt; list = new ArrayList&lt;?&gt;();
  </code></pre>
  
  <p>So what to use in  that I can use all the methods in the objects.    </p>