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
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
-~----------~----~----~----~------~----~------~--~---