There are 2 classes, 1 LandAnimal and another WaterAnimal.
There is another class Animal which wants to have the
properties of both LandAnimal and WaterAnimal. How will you
design this situation?
Answer Posted / vikneswarank
class LandAnimal
{
//some code here
}
class WaterAnimal extends LandAnimal
{
//soma code here
}
class Animal extends landAnimal
{
// here we can access properties both class
}
| Is This Answer Correct ? | 2 Yes | 19 No |
Post New Answer View All Answers
What is string [] java?
Difference between notify() method and notifyall() method in java?
What are the advantages of encapsulation in java?
What do you mean by boolean?
What is an example of procedure?
How does linkedlist work in java?
What is the purpose of using bufferedinputstream and bufferedoutputstream classes?
What happens when a thread cannot acquire a lock on an object in java programming?
What is a parameter example?
What super () does in java?
What is java in layman terms?
Difference between vector and arraylist.
What is data member in java?
What is java developer skills?
Explain about version control?