Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the limitations of procedural programming approach?

1021


What is procedure overloading?

2272


What mechanism does java use for memory management?

944


Why is multithreading important?

913


Where are the card layouts used?

1040


Difference between keyword and identifier.

993


Define canvas?

937


What is difference between static and final?

1035


What are the differences between Java 1.0 and Java 2.0?

2227


Is string a class?

990


What is the difference between variable & constant?

991


What is the use of conditional statement?

951


What is the diffrence between inner class and nested class?

1045


What is difference between public static and void?

967


What is square root in java?

1063