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 / abdul
class WaterAnimal
{
// code
}
class LandAnimal extends WaterAnimal
{
//This class has WaterAnimal properties
}
class Animal extends LandAnimal
{
//This class has both LandAnimal and WaterAnimal properties
}
| Is This Answer Correct ? | 10 Yes | 9 No |
Post New Answer View All Answers
take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).
Is a boolean 1 bit?
What does localhost mean?
Which container method is used to cause a container to be laid out and redisplayed in java programming?
What is static method with example?
Which collection is sorted in java?
How do you control extraneous variables?
What is the use of http-tunneling in rmi?
What is an eror in java?
How do you read and print a string in java?
What is super in java?
What is an argument in java?
What is the concatenation operator in java?
Can a class extend more than one class?
What is one third plus one third as a fraction?