What is an overloaded method?
- Overloaded methods are the ones which have the same name but different signatures.
- They add or extend more to the method functionality.
- Methods have different parameter lists or type or the return type.
- Static method happens in overloading.
- It happens at compile time.
Example:
void calculate(float x)
{
//Statements
}
void calculate(double x)
{
//Statements
}
void calculate(int x)
{
//Statements
}