Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

create objects of the child classes using an array of parent class variable

843789Jun 1 2010 — edited Jun 1 2010
Hi all,
Please help me with this one,

How do you create objects of the child classes using an array of parent class variables?

Lets assume i have a parent class called Shape, and three subclasses Triangle, Circle, and Rectangle. How will i create objects of the subclasses using an array object of the parent class variable.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 29 2010
Added on Jun 1 2010
5 comments
1,033 views