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 the difference between a method and a procedure?
Why char array is preferred over string for storing password?
What is the final method?
Does java vector allow null?
What restrictions are placed on method overriding?
How do you compare two objects?
What is the use of conditional statement?
What does the ‘static’ keyword mean? Is it possible to override private or static method in java?
What is difference between next () and nextline () in java?
What is meant by polymorphism?
What are different ways of object creation in java ?
What is an exception in java?
Difference difference paint() and paintcomponent()?
Can we create an object of private class?
What are the main uses of java?