Java 多个else用法

2019年2月12日21:49:42 发表评论 3,856 views

发现个好东西: 一个免费短链生成项目:“ https://www.isok.co”一个可以生成所有短链的服务,isok.co的这个含义能覆盖所有短链含义isok, 我试过了很不错,都可以试试

/**
 * Created by xabcd on 2019/2/12.
 */
public class Testjava_ifn
{public static void main(String[] args)
{
    int x = 1;
    if (x ==1)
        System.out.println("x ==1");
    else if(x ==2)
        System.out.println("x ==2");
    else if (x ==3)
        System.out.println("x ==3");
    else
        System.out.println("x>3");
}
}

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: