I need to know which one of the following examples gives me higher performance?
Object O = someValue;
if (condition){
//statements
//statements
} else {
//statements
//statements
}
Or
Object O;
if (condition){
O = someValue;
//statements
//statements
} else {
O = someValue;
//statements
//statements
}
Or
if (condition){
Object O = someValue;
//statements
//statements
} else {
Object O = someValue;
//statements
//statements
}
NOTE: someValue is equal in all cases