比较switch和多重if选择结构
Posted yun---meng
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了比较switch和多重if选择结构相关的知识,希望对你有一定的参考价值。
!相同点:都是用来处理多分支条件的结构
!不同点:
switch选择结构:只能处理等值条件判断的情况
/* !如果需要每个case执行完后跳出,在每个case后不要忘记写break;
!default块顺序可以变动,但要注意其执行顺序。
通常,default块放在末尾,也可以省略 */
多重if选择结构:没有switch选择结构的限制,特别适合某个变量处于某个连续区间时的情况
!--5f39ae17-8c62-4a45-bc43-b32064c9388a:W3siYmxvY2tJZCI6IjI1MTgtMTU3MTY2MjYzNDM4MyIsImJsb2NrVHlwZSI6InBhcmFncmFwaCIsInN0eWxlcyI6eyJsaW5lLWhlaWdodCI6MSwiYWxpZ24iOiJsZWZ0IiwiaW5kZW50IjowLCJ0ZXh0LWluZGVudCI6MCwiYmFjay1jb2xvciI6IiIsInBhZGRpbmciOiIifSwidHlwZSI6InBhcmFncmFwaCIsInJpY2hUZXh0Ijp7ImRhdGEiOlt7ImNoYXIiOiLmr5QiLCJzdHlsZXMiOnsiYm9sZCI6dHJ1ZSwiZm9udC1mYW1pbHkiOiJLYWlUaV9HQjIzMTIiLCJmb250LXNpemUiOjEyLCJjb2xvciI6IiMxMjFmNTUifX0seyJjaGFyIjoi6L6DIiwic3R5bGVzIjp7ImJvbGQiOnRydWUsImZvbnQtZmFtaWx5IjoiS2FpVGlfR0IyMzEyIiwiZm9udC1zaXplIjoxMiwiY29sb3IiOiIjMTIxZjU1In19LHsiY2hhciI6InMiLCJzdHlsZXMiOnsiYm9sZCI6dHJ1ZSwiZm9udC1mYW1pbHkiOiJLYWlUaV9HQjIzMTIiLCJmb250LXNpemUiOjEyLCJjb2xvciI6IiMxMjFmNTUifX0seyJjaGFyIjoidyIsInN0eWxlcyI6eyJib2xkIjp0cnVlLCJmb250LWZhbWlseSI6IkthaVRpX0dCMjMxMiIsImZvbnQtc2l6ZSI6MTIsImNvbG9yIjoiIzEyMWY1NSJ9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VlfX1d-->以上是关于比较switch和多重if选择结构的主要内容,如果未能解决你的问题,请参考以下文章
比较switch和多重if选择结构
选择结构
java的选择结构
Java基础第四章(选择结构二)
switch运用多重if和嵌套if的使用条件
Java 第四章