Click here to Skip to main content
11,701,616 members (68,276 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: Objective-C
What is the difference between overloading and overriding in object-orientated systems?
Posted 21-Jul-10 23:13pm
Edited 21-Jul-10 23:23pm
Alison P at 22-Jul-10 5:25am
I have removed your email address and replaced it with a proper title. The title is there so that people know whether they want to read your question so it is best to make it descriptive and if you put your email address on public forums it only encourages spam. :)
Sandeep Mewara at 22-Jul-10 5:57am
Any beginner book would had told you that. Hope you have just not jumped to programming without reading one!
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Overloading is when you define two methods with the same name in the same class but with different signatures.

Overriding is when you redefine a method that has already been defined in a parent class with ther same signature.

Overloading is resolved at compiletime. Overriding is mostly resolved at runtime, depending on language and situation. C++ and C# for example, are tricky in this respect, as methods are by default not overridable at runtime, but compile time (the virtual keyword controls this behaviour). The C# compiler will however issue warnings when it suspects you have got it wrong.

Hope that helps.
E.F. Nijboer at 22-Jul-10 5:31am
Although the question is ridiculous, your answer is completely correct :)
E.F. Nijboer at 22-Jul-10 5:32am
Reason for my vote of 5
Good answer
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Come on, are you serious? Just use google or look on the wiki page for oop.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

1)In overloading,function name must be the same but with different signatures,In overloading,function name must be the same but with same signatures
2)In overloading,methods got different functionalities but in overriding we have to redefine the defination of the base class's method using override keyword
3)Overloading is know as early binding,Overriding is know as late binding
4)Overloading can be performed without inheritence but overriding can't

Sajid Ahmed Shahsroha
Sajid Ahmed Shahsroha at 19-Mar-11 7:57am
whoever downvoted me plz could you tell me why ?? so that i can improve myself
Member 10144694 at 18-Oct-13 5:57am
you have to replace the word overloading with overriding in first line.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 324
1 Maciej Los 275
2 Sergey Alexandrovich Kryukov 250
3 Mika Wendelius 189
4 CHill60 110
0 OriginalGriff 8,274
1 Sergey Alexandrovich Kryukov 7,317
2 CPallini 4,912
3 Maciej Los 4,146
4 Mika Wendelius 3,556

Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 14 Mar 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100