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, int and int, String.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With