Difference between Overloading and Overriding?
Answer Posted / shoaib
1. Overloading doesn't block inheritence from the
superclass where as Overriding blocks inheritance.
2. Overloading -> If two functions having same name and return type, but with different type and/or number of arguments. Overriding -> When a function of base class is re-defined in the derived class
3. Overloading is compile time binding, where as overriding is dynamic binding
4. In overloading function name are same but signatures
parameters are different .while in overriding function name are as well as argument are same in drive class as in super class.
Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
Can we get the value of ios format flags?
How to access a variable of the structure?
Describe private, protected and public?
C is to C++ as 1 is to a) What the heck b) 2 c) 10
Describe new operator and delete operator?
Can union be self referenced?
How to tokenize a string in c++?
Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300â€Â,â€ÂBullCart : 10â€Â) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side
How can I disable the "echo" feature?
Is c++ a good beginners programming language?
What is a hashmap c++?
Is c++ built on c?
Which format specifier is used for printing a pointer value?
Can we use this pointer in a class specific, operator-overloading function for new operator?
How can you quickly find the number of elements stored in a static array?