标签:public
class TestIf2 { public static void main(String[] args) { int age=31; if(age>18){ System.out.println("你已经成年"); }else{ System.out.println("你还未成年"); } if(age>100||age<0){ System.out.println("你估计不是人"); }else if(age<30){ System.out.println("人家还很年轻,只有"+age+"岁啦~~"); }else{ System.out.println("表追我,我已结婚"); } } }
标签:public
原文地址:http://9815936.blog.51cto.com/9805936/1600139