ArrayList of type superclass problem
I`m new to java and actually this is my 1st real program.
now my problem is i have an abstract super-class "Component" and contains one abstract method run() and two Attributes and their concrete setAttribute functions
inherited from this class sub classes that contain their own attributes and concrete methods
I made an ArrayList of type Suber-class <Component> and let it refer to instances of the sub-class
now if i try to call a concrete method of any sub class instance the compiler tells me that the given method is not defined for the component class !!!
should i define every sub class specific concrete method in the sub class !?
sorry for the long topic and I hope you help me the new java programmer