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 static keyword?

783


What is jee6?

744


Difference between concurrent hashmap and hashtable and collections

796


What are the advantages of defining packages in java?

737


Highest level event class of the event-delegation model?

3703


Why scanner is used in java?

776


How do you use compareto?

713


What are data structures in java?

724


What is an immutable object? How do you create one in java?

818


What is the purpose of using bufferedinputstream and bufferedoutputstream classes?

802


Can we clone singleton object?

803


Explain illegalmonitorstateexception and when it will be thrown?

830


How do you find the maximum number from an array without comparing and sorting?

870


how to run ecllipse with jettyserver for windows environment using batch file

1716


What are the fileinputstream and fileoutputstream?

834