Difference between Method Overloading and Method Overriding
- Method Names: - In Overloading method name should be same, And Even In Overriding method name should be same.
- Argument Type: - In Overloading, argument type must be different (at least the order of arguments), But in the Overriding argument type must be same.
- Method Signature: - In Overloading, method signature must be different, But in the Overriding method signature must be same.
- Return Type: - In Overloading, there is no restriction on the return type, But in Overriding return type must be same until 1.4 v, But from 1.5v onwards co-variant return type is allowed.