difference between overloading and overridding

Answer Posted / $rav$...

OVERLOADING:-Principle of overloading is achieved through
polymorphism .we can have any number of methods with the
same name but the difference in the signature(:parameters ).
OVERRIDING:-Principle of overriding is achieved through
inheritance.we can have any number of methods with same
name,parameters and signature but the rewriting of the code
of the super class method in the subclass is done and we
give the new functionality to that method of keeping its
signature as the same.
dynamic binding prevails in overriding.inheritance is
compulsory.
static binding prevails in overloading.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need oop?

872


Describe these concepts: Polymorphism, Inheritance and Abstraction.

869


What is the highest level of cohesion?

768


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

925


What is the importance of oop?

839


What is polymorphism what are the different types of polymorphism?

747


What is protected in oop?

811


What are two types of polymorphism?

805


What are properties in oop?

808


What is oops and its features?

829


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2272


What does oop mean in snapchat?

922


i got a backdoor offer in process global,Bangalore..Can i work with it?

2578


What is difference between inheritance and polymorphism?

778


What is polymorphism and example?

777