Microsoft interview question

what is method overloading and overriding? Difference? Give examples.

Interview Answer

Anonymous

23 June 2012

Overloading : Use of same name for two or more methods ....but arguments or the return type are different for each of them. Overriding : Redefining method in the child class ...with same arguments and same return type. For example: int function(){}; and int function(String k){} is overloading.

4