Personally, I prefer the if/else structure. It's clearer (not that the other one is a stretch). It makes a bigger difference on a method that returns something. For example:
Code:
public boolean checkit () {
boolean stat = false;
if (abc) {
doSomething(x);
stat = true;
} else {
doSomething(y);
stat = false; //the default, so not really necessary
}
return stat;
}
Opinions will probably vary on this one, but I like having a single return where possible. (Although I'm sure I've violated this in some of my code).
