Objects of superclass into arraylist?
<p>I'm learning Java and I have a problem that I can't understand or solve! I have just learned about inheritance and abstract methods. So I have done a superclass that I call Account and then two subclasses that I call savingsAccount and creditAccount. I have also put the objects of the subclasses into two separate arraylist.</p>

<p>But now I have to change it, because my teacher want me to create an account object and put that into an arraylist and reach the savingsAccount objects and the creditAccount objects from that list instead of having two separate list.</p>

<p>But when I'm reading about absract classes and methods, it seems that you can't create an object of an abstract superclass!? So how should I create an object of account and still use the abstract methods? Help is appreciated! Thanks!</p>
