public class HelloWorld { public static void main(String[] args) { int one = 20 ; if(one%2==0) System.out.println("是偶数"); else System.out.println("是奇数"); String str = (one%2 == 0) ? "是偶数" : "是奇数"; System.out.println(str); } }
0_Y_
2014-09-27
0 回答
举报
0/150
提交
取消