Difference between Overloading and Overriding?

Answer Posted / george ananth

Overloading(Early Binding):
-> having more than one method with the same name but different signature(argument type, return type, no of argument etc)

-> Compile time Polymorphism because in the compile time system required to find which method is called


Overriding(Late Binding):
-> If the function of base class is redefined in in the derived class is called overriding..The method name and signature of the base class must be same in the derived class (this is done using "virtual and override keyword or new keyword)

-> Run time Polymorphism because system doesn't know which method need to invoke at the compile time..

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

There are 100 students in a class. The management keep information in two tables. Those two tables are given like Roll no Name Age 001 ABC 15 002 XYZ 14 and Roll No Subject Marks 001 Math 75 001 Physics 55 002 Math 68 001 Hindi 69 They want the information like this Roll No Name Hindi Physics Math Total 001 ABC 69 55 75 199 002 XYZ 68 74 84 226 And Roll No Suject Highest 001 Math 98 007 Physics 84 021 Hindi 74 All 275 All information is kept in structure in main memory. You have to find last two tables.

2534


What does new in c++ do?

569


Does a derived class inherit or doesn't inherit?

620


Why is c++ so fast?

531


What do you mean by static variables?

604






What is a buffer c++?

586


What does new do in c++?

637


Can a Structure contain a Pointer to itself?

612


Define 'std'.

610


What are shallow and deep copies?

636


Write a program to interchange 2 variables without using the third one.

590


What is a storage class? Mention the storage classes in c++.

595


Should I learn c++ c?

619


Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.

619


Describe new operator?

622