posted 21 years ago
No they do not.
The argument to return must be an expression, not a statement.
Ie, you return a value, like:
return 5;
or
return x*2;
or
return getValue();
Etc.
You can't "return" a statement:
return (while(true) { } ) ; //compiler error
And if statement, is a statement, not an expression. An expression is something you evaluate and obtain a value for. You merely execute a statement, it has no value.