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 / kash
@ Bhaskr Reddy
The only problem I see with your solution is when I want to create the object Animal which has to implement properties from both WaterAnimal and LandAnumal: How will I create an instance of of class Animal which implements both the interfaces at the same time?
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the limitations of procedural programming approach?
What is procedure overloading?
What mechanism does java use for memory management?
Why is multithreading important?
Where are the card layouts used?
Difference between keyword and identifier.
Define canvas?
What is difference between static and final?
What are the differences between Java 1.0 and Java 2.0?
Is string a class?
What is the difference between variable & constant?
What is the use of conditional statement?
What is the diffrence between inner class and nested class?
What is difference between public static and void?
What is square root in java?