What is the difference between overriding & overloading?

devquora
devquora

Posted On: Feb 22, 2018

 

When there are different methods in one class that have the same name but distinct parameters, overloading takes place. What happens at the time of overriding is that the methods have the same name as well as the same parameters. But one method here will belong to the parent class the other will belong to the child class. Also, these two are different types of concept as well, where overriding is the run-time type and the overloading is the compile-time type.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Data Structure Interview Questions

    What is meant by Object Oriented Programming – OOP?

    Object-oriented programming (OOP) is a computer programming technique that organizes software design around data, or objects, rather than functions and logic. An object can be defined as a data field ...

    Data Structure Interview Questions

    What is meant by Structural Programming?

    Structured Programming can be defined as a programming Approach in which the program is made as a single structure. Lines or blocks of codes are written and executed in a sequential manner such as one...

    Data Structure Interview Questions

    What is meant by Class?

    A class is the most important part of object-oriented programming which is used for the purpose of creating objects. It is defined as the template of similar types of objects consists of a declaration...