把one改成奇数,结果为啥不变?
package com.sem;
public class HelloWorld {
public static void main(String[] args) {
int one=27 ;
if (one%2==0);{
System.out.println("one是偶数");
}
}
}
运行结果还是“one是偶数”,为什么呢?
package com.sem;
public class HelloWorld {
public static void main(String[] args) {
int one=27 ;
if (one%2==0);{
System.out.println("one是偶数");
}
}
}
运行结果还是“one是偶数”,为什么呢?
2016-04-17
举报