首页 > 其他 > 详细

条件分支

时间:2016-08-07 16:55:38      阅读:283      评论:0      收藏:0      [点我收藏+]

/*条件分支三种方式
 * 1.if语句
 * 2.if-else
 * 3.if-else-if-ele*/

public class Tiaojianfenzhi {
    public static void main(String[] args){
        int money = 8000;
        
        if(money == 8000){
            System.out.println("I can buy a mac laptop");
        }else if(money == 4000){
            System.out.println("I can buy a hasee laptop");
        }else{
            System.out.println("I can buy nothing");
        }
    }

}

 

条件分支

原文:http://www.cnblogs.com/saimeco/p/5746499.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!