+ 1
When use method overloading and when use method overriding concept??
I totally confused to use that both overloading and overriding in java code
2 Respostas
+ 1
//C# examples:
// overriding
class base {
public virtual void methodName()
}
class child : base {
public override void methodName()
}
//overload
class whatever {
public void methodName(int parameter) { do something ;}
public void methodName(string parameter)
{ do something else; }
}