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 / 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


Please Help Members By Posting Answers For Below Questions

What is string [] java?

920


Difference between notify() method and notifyall() method in java?

939


What are the advantages of encapsulation in java?

981


What do you mean by boolean?

1039


What is an example of procedure?

991


How does linkedlist work in java?

890


What is the purpose of using bufferedinputstream and bufferedoutputstream classes?

1044


What happens when a thread cannot acquire a lock on an object in java programming?

977


What is a parameter example?

950


What super () does in java?

884


What is java in layman terms?

982


Difference between vector and arraylist.

1068


What is data member in java?

991


What is java developer skills?

946


Explain about version control?

1002