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 is prime number in java?
What is immutable data?
What is update method called?
What is meant by collection in java?
Can we inherit inner class?
Explain about map interface in java?
Where are the local variables stored?
Why do we need data serialization?
What is the purpose of the runtime class in java programming?
Are there structures in java?
What is difference in between java class and bean?
List some important features of java 10 release?
Can we cast any other type to boolean type with type casting?
What is hashmap and map?
What is the advantage of preparedstatement over statement?