There are two types of if statements in java - classic: if {} else {} and shorthand: exp ? value1 : value2. Is one faster than the oth
if
if {} else {}
exp ? value1 : value2
These are the same. Both of them are fairly fast, typically around 10-30 nano-seconds. (depending on usage pattern) Is this time frame important to you?
You should do what you believe is clearest.