I am having a methods like
// Base Class
public void foo(long A, long b,long c)
{
//Implementation 1
}
//Derived Class
public void foo(long AA,long b,long c)
{
//Implementation 2
}
I would like to what is wrong with this design ?
FYI:
I am using Proxy pattern for my design
Thanks
The name of the parameters doesn’t matter. Come run-time there is no way for java to tell which method you wanted to call at a given time. To overload methods the signatures have to be different so either there must be a different number of parameters or the parameters must be in a distinguishable order i.e.
String, intandint, String.