Difference between over loading and over ridding?

Answer Posted / rameshwar gaikwad

Difference

Method OverLoading
1. Same method name with different number of argument
2. Number of argument with different datatype
3. Each method may returns different type of value
4. All overloaded methods founds to be in one class.

Method OverRiding
1. Same method name with same number of argument
2. Number of argument with same datatype
3. Each method must returns same type of value
4. Each overrided method of base class founds in respective
derived class.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why we use classes in oop?

585


What is object in oop with example?

704


How does polymorphism work?

635


Is data hiding and abstraction same?

569


Why do we use inheritance?

630






What language is oop?

597


What are functions in oop?

586


Do you know about multiple inheritance?

643


Why is static class not inherited?

601


What is new keyword in oops?

593


What is basic concept of oop?

702


What is an example of genetic polymorphism?

651


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.

632


What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?

1654


What is coupling in oops?

600