这节课好像没有教else语句,return
public class HelloWorld {
public static void main(String[] args) {
int one = 22 ;
if(one%2==0){
System.out.println("奖励一个苹果");
}
else{
System.out.println("重写!");
}
}
}
public class HelloWorld {
public static void main(String[] args) {
int one = 22 ;
if(one%2==0){
System.out.println("奖励一个苹果");
}
else{
System.out.println("重写!");
}
}
}
2019-01-26
举报