Possible Duplicate: Does Java support default parameter values?
Suppose I want to make default parameter value in C++, then we can express it as below.
void functionName(char *param1, int param2=2);
But if I want to make this in Java, then is it possible. Currently I am doing as below
public functionName(String param1)
{
this(param1, 2);
}
public functionName(String param1, int param2)
{
..........
}