Given the following code snippets, is there any appreciable difference?
public boolean foo(int input) { if(input > 10) { doStuff(); retur
Semantically — no. Performance-wise this depends on compiler, i.e. whether it can spot that both conditions cannot be true at once. I'd bet standard Sun compiler can. Whether to use single exit principle depends on tastes. I personally hate it.