Possible Duplicate:
Implementations and Collections
My super class is Exam. One of my sub classes is Analytical.
This is a valid within my ide
Exam object = new Analytical();
However this is not.
ArrayList<Exam> object = new ArrayList<Analytical>();
The error is from new to the end of the statement and it says "Change type of object to ArrayList. So my question is how can I properly utilize polymorphis with this data structure. Thank you.