Monday, 16 May 2016

Overriding vs. Overloading in Java

By,
Sachin

1. Definitions
The Overloading occurs when two or more methods in one (single) class have the same method name but different parameters or variables. Overriding means having two methods with the same method name and parameters. One of the methods is in the parent or main class and the other is in the child or sub class. 

Overriding allows a child or sub class to provide a specific operation or implementation of a method that is already provided its parent or main class..To Read More....Click Here

No comments:

Post a Comment