If I have a statement block like this:
if (/*condition here*/){ }
else{ }
or like this:
if (/*condition here*/)
else if (/*condition here*/) {}
else if (/*condition here*/) {}
What is the difference?
It seems that with if/else, if part is for true state and the else part is for all other possible options (false). An else-if would be useful for a number of conditions. This is my understanding, is there anything more I should be aware of?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…