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
What is an image buffer?
How you can force the garbage collection?
Where we write javascript code in html page?
How to change the priority of thread or how to set priority of thread?
What is null data type?
What are the different approaches to implement a function to generate a random number?
How do you represent a space in regex java?
How does varargs work in java?
what is daemon thread and which method is used to create the daemon thread? : Java thread
How do you differentiate abstract class from interface?
What is concurrent hashmap and its features?
Can we sort set in java?
How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?
How do you override a method?
How many wrapper classes are there in java?