Full if/else statement vs. Conditional Operator [duplicate]
问题 This question already has answers here : Closed 9 years ago . Possible Duplicates: Benefits of using the conditional ?: (ternary) operator Is the conditional operator slow? Hi all, I've got a pretty simple question regarding the different if/else statements. Apart from writing less code, are there any other benefits for using the conditional operator as opposed to the full if/else statement? Is there a performance increase, less compiled code, or anything else that would benefit me when using