In an If-Else Statement for a method return, should an Else be explicitly stated if it can instead b
- by ccomet
I have a method that checks certain things and returns a Boolean based on those checks. It involves a single branching If section that checks about 5 conditions in sequence. If any of those conditions return true, then the method will return true;. If none of the conditions return true, then the method will return false;. Since the code after the If section will only run if none of the conditions are true, then that code is logically identical to including an actual Else statement.
So is it a better idea to actually write in the Else statement for this kind of situation?