talking about java performance .. what is better? if..else or multiple simple if
if( condition ) {
some_code;
return value;
}
else if( condition ) {
so
The if...else example you give doesn't need the return
s if this is in a function with no return value. In that case, the if...else will be easier to read.
Furthermore, the if...else should be preferred because it makes explicit that these cases are mutually exclusive.
If there's a performance difference here, then your compiler/interpreter sucks.