can any one tell me when do u go for inheritance and
polymorphism

Answer Posted / kishor kommulas

Inheritance:::

If you want to make use of the functionality of the method,
which is already there then you can go for the inheritance.

Polymorphism::::

If you want to use the same method name for different
method,then you can go for Polymorphism.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a vector contain heterogenous objects?

609


What is the size of a string in java?

554


What is the relationship between class and object?

533


Does importing a package imports its sub-packages as well in java?

563


Is string a class?

561






What is the function of character?

536


What is the use of static class?

555


How do you delete a list in java?

542


How many bytes is double?

554


What are invisible components?.

1685


Can we execute java program without main method?

526


Why string is called as immutable?

529


Is java util list serializable?

545


Can we serialize arraylist in java?

554


Explain the private protected method modifier?

557