Difference between Overloading and Overriding?

Answer Posted / janet

1. In overloading,there is a relation ship between methods
available in the same class where as in overridding,there
is relationship between a super class method and subclass
method.
2. overloading doesn't block inheritence from the
superclass where as overridding blocks inheritence.

3. in overloading,seperate methods share the same name
where as in overridding,subclass methods replaces the
superclass.

4.overloading must have different method signatures where
as overriding must have same signature.

Is This Answer Correct ?    482 Yes 79 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h

667


How can we check whether the contents of two structure variables are same or not?

579


Does c++ have string data type?

682


What is cout flush?

561


Write an algorithm that determines whether or not an almost complete binary tree is a heap.

3421






daily Routine of father

899


What are the various storage classes in C++?

641


Explain the term memory alignment?

668


What is the average salary of a c++ programmer?

534


Is c++ faster than c?

584


Is it possible for the objects to read and write themselves?

634


To what does “event-driven” refer?

600


Do class declarations end with a semicolon? Do class method definitions?

609


If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3

824


Define a nested class.

606