public class HelloWorld {
public static void main(String[] args) {
int one = 20 ;
if(one%2==0){
System.out.println("one是偶数")
System.out.println("one是偶数")后面没分号,java里面的符号号都是在英文状态下输入
正确格式:
public class HelloWorld {
public static void main(String[] args) {
int one = 20 ;
if(one%2 == 0){
System.out.println("one是偶数");
}
}
}
输出少了";"