if条件句和条件运算符的区别
public class HelloWorld {
public static void main(String[] args) {
int one = 20 ;
String res =(one%2==0)? "one是偶数" :"one是奇数";
System.out.println(res);
}
}
public class HelloWorld {
public static void main(String[] args) {
int one = 20 ;
String res =(one%2==0)? "one是偶数" :"one是奇数";
System.out.println(res);
}
}
2016-06-16
举报