I have a similar situation, but it is a little different. I have a Parent class with an associated Child class. Using a linked list, how would I set this up so that when a new Parent was created, a Child multiple Child objects were also created.
Thanks! ________________________________ From: [email protected] [[email protected]] On Behalf Of Lakshmi Chidambaram [[email protected]] Sent: Thursday, May 28, 2009 12:19 PM To: Free Java Programming Online Training Course By Sang Shin; [email protected] Subject: [java programming] Re: help to me about Inheritance in java Since the Person class is the super class of Manager and Employee, you can create it in the following way. Person[] person = {new Person(), new Employee(), new Manager() }; hope this is helpful. --- On Thu, 28/5/09, [email protected] <[email protected]> wrote: From: [email protected] <[email protected]> Subject: [java programming] help to me about Inheritance in java To: "Free Java Programming Online Training Course By Sang Shin" <[email protected]> Date: Thursday, 28 May, 2009, 10:21 PM I have three class as following - person class - employee class - manager class employee class and manager class extend the class person I want to create a person array with 3 elements element 1 is person element 2 is employee element 3 is manager how to create 3 elements ? ________________________________ Cricket on your mind? Visit the ultimate cricket website. Enter now! <http://in.rd.yahoo.com/tagline_cricket_1/*http://beta..cricket.yahoo.com> --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
