java-if...else if...else语句调试

package com.day5.two;

public class If_Demo {

  /**
  * @param args
  * if...else if...else...语句是个整体,只要一条语句满足就结束
  */
  public static void main(String[] args) {
    int n=3;
    if (n>1)
      System.out.println("a");
    else if (n>2)
      System.out.println("b");
    else if (n>3)
      System.out.println("c");
    else
      System.out.println("d");
  }
}
  //结果输出a

原文地址:https://www.cnblogs.com/zhujialei123/p/8094473.html