9.3.3 Return value
Find ways to structure your program to fit its purpose. For example:
if (booleanExpression) {
return true;
} else {
return false;
}
should be replaced by the following method:
return booleanExpression ;
Similarly:
if (condition) {
return x;
}
return y;
should be written as:
return (condition ? x : y);