三位运算符,联系操作

package hello;

public class gaofushuai {
    public static void main(String[] args){
        int a=1;
        int b=1;
        int c=1;
        String str=a>0?"高":"矮";
        String www=b>0?"富":"穷";
        String sss=c>0?"帅":"丑";
        System.out.print(str+www+sss);
    }

}

 

posted @ 2015-12-02 18:09  记忆还是空白  阅读(232)  评论(0)    收藏  举报