I know there’s got to be an easy way to do this, but I can’t find it for the life of me.
When I build a new method, I want to be able to make it so that the first parameter is always required, but the second is optional. i.e.:
public void calculate(int firstnum, Object objpass) {
…do something with firstnum…
…do something with objpass as pertaining to firstnum calculation if objpass exists…
}
Any way to do this? If I specify the the second parameter in the method parameter list, it requires it when called. Help?
