prograMNewbie
asked on
Dont understand a method
What is going on in this method? Even though its a void return type is has a return?
public void setVal(String val)
{
if (valr == null)
{
return;
}
}
Many thanks
You can always have return. This method effectively does nothing though
(as you wouldn't know from calling the method whether the String *was* null)
ASKER
So is it the same as:
public void setVal(String val)
{
if (val == null)
{
}
}
YES
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I see, thanks everyone ;)