Thursday, March 15, 2007

Difference between Overloading and Overriding

Though its easy to determine whether Overloading or overriding takes place , using the argumentlist,return types,access specifiers and exceptions.We do confuse while invoking the methods using reference type and object type.

In case of overloading ,Reference type determines which method is selected from which class.In case of overriding ,Object type determines which which method is selected from which class.

Overloading happens during compile time,while overriding happens during Runtime.

No comments: