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

What is use of a abstract variable?

753


when to use ArrayList and when to use HashMap in webApplication.

4255


Can a boolean be null java?

758


What is use of super keyword in java?

826


What java is used for?

846


Should database connections be singleton?

779


What is the difference between a checked and an unchecked exception?

771


What is a bufferedreader?

755


What is method reference in java?

826


What are void methods?

817


Explain where variables are created in memory?

782


What is Java Shutdown Hook?

853


What is blank final variable?

815


What is wrapper class example?

755


Explain the difference between throw and throws in java?

787