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

Is map sorted in java?

572


What is java console application?

564


Is linked list a linear or non-linear data structure?

551


Why do we need singleton?

546


What is illegal identifier in java?

540






Convert a BST into a DLL and DLL to BST in place.

674


What is native code?

540


How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?

607


What are the types of collections in java?

545


Difference between comparator and comparable in java?

624


Why we use methods in java?

545


How do you escape json?

542


What is variable and rules of variable?

520


What are encapsulation, inheritance and polymorphism?

532


what are three ways in which a thread can enter the waiting state? : Java thread

584