public class atest {
public static boolean isOdd(int n) {
return n % 2 == 1;
}
public static void main(String[] args) {
if (isOdd(0))
System.out.print("ok");
else
System.out.print("Sorry");
}
}
结果sorry,没错啊。我是新手,误解了?