|
|
|
|
|
by Detrytus
977 days ago
|
|
Why would overloading repeat the code? It's typical to do it like that (in Java): public int doStuff(int a, int b) { //some code } public int doStuff(int a) { return doStuff(a, 7);} // so b=7 by default. No need to repeat actual business logic code. Of course that gets complicated if there are many parameters with default values. |
|