what is overloading and overriding?

Answer Posted / dinesh

OVERLOADING:Two methods are having same name and different arguments in same class
OVERRIDING: Two methods are having same name and same arguments also same return types in its class and sub class (from 1.5 on words co-varient return types also allowed this is applicable for only for object types not primitives)i.e some relation either parent to child or child to parent

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a null tree?

889


Write a program to reverse a string using recursive function?

2051


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1724


What is static in oop?

839


Where is pseudocode used?

764


What is polymorphism and its types?

827


What is difference between multiple inheritance and multilevel inheritance?

910


Why do we use encapsulation in oops?

769


What are the components of marker interface?

815


Why is oop useful?

826


What does and I oop mean in text?

876


What do you mean by Encapsulation?

834


Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

3852


Why is destructor used?

777


What is ambiguity in inheritance?

871