Employee has a Passport. here employee is an object and
passport is an object, give the class design
Answer Posted / dhanshrikekre@yahoo.com
as much i cn understand ur questn..its lyk
emp. obj has the properties of passport obj.
class passport1
{
}
class employee1 extends passport
{
}
its a concept of inheritance..
class TMain
{
p s v m()
{
//obj of emp..1 as employee;
//it 'l access pass..1 class
//it cn b chckd by making passport obj.
}
}
}
| Is This Answer Correct ? | 2 Yes | 8 No |
Post New Answer View All Answers
How does java handle integer overflows and underflows?
What is the resourcebundle class?
What is the first argument of the string array in main method?
What is the locale class?
What if I write static public void instead of public static void?
What do you understand by casting in java language? What are the types of casting?
Can we extract main method from another class?
what is reflection api? How are they implemented?
Are jvm’s platform independent?
What is the java api?