为何打印一直报错
public class HelloWorld {
public static void main(String[] args) {
int one = 28 ;
if(one!=0){
if(one%2==0){
System.out.print("这是偶数!!");
}else{
System.out.print("这是奇数!!");
}
}else{
System.out.print("0不是奇数也不是偶数!!");
}
}
}
public class HelloWorld {
public static void main(String[] args) {
int one = 28 ;
if(one!=0){
if(one%2==0){
System.out.print("这是偶数!!");
}else{
System.out.print("这是奇数!!");
}
}else{
System.out.print("0不是奇数也不是偶数!!");
}
}
}
2019-09-17
举报