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 is OOP's Terms with explanation?

1189


What is an argument java?

974


What is difference between overloading and overriding in java?

1027


What are the rules for naming an array?

1060


we have syntax like for(int var : arrayName) this syntax is to find whether a number is in the array or not.but i want to know how to find that number's location.

2034


How can the checkbox class be used to create a radio button?

1039


Can long be null in java?

1023


What is string pool?

1127


what is the purpose of "virtual"?

1086


What is variable explain with example?

1063


Can we override singleton class?

985


When can you say a graph to be a tree?

1085


What does I ++ mean?

1065


What is use of static method?

1055


What is the parse method in java?

1123