title: ArrayList to Access Methods in Classes
body: <p>Is it possible to create an ArrayList that contains new instances of a Class and then use that ArrayList to access methods in the given class? Here is an example to make it more clear:</p>
  
  <pre><code>ArrayList&lt;myOtherClassName&gt; myClassObjects= new ArrayList&lt;myOtherClassName&gt;();
  myClassObjects.add(new myOtherClassName());
  myClassObjects.indexOf(1).methodInOtherClass();
  </code></pre>
  
  <p>This, however, doesn't work!
  Is there a way to achieve what I want?</p>