Is it possible to set the default method parameter values in Java?
Example:
If there is a method
public int doSomething(int arg1, int arg2)
{
//some logic here
return 0;
}
is it possible to modify the given method in order to be able to call it with and without parameters?
example:
doSomething(param1, param2);
doSomething();
Thanks!
No comments:
Post a Comment