{}這個(gè)怎么用,怎么配
public class HelloWorld {
? ? public static void main(String[] args) {
int one = 20 ;
if(one%2=0);{
? ? System.out.println("one是偶數(shù)");
}
? ? else{
? ? System.out.println("one不是偶數(shù)");
? ??
? ? }
? ??
? ??
}
}
public class HelloWorld {
? ? public static void main(String[] args) {
int one = 20 ;
if(one%2=0);{
? ? System.out.println("one是偶數(shù)");
}
? ? else{
? ? System.out.println("one不是偶數(shù)");
? ??
? ? }
? ??
? ??
}
}
2016-05-21
舉報(bào)
2016-05-21
左括號(hào)匹配離他最近的右括號(hào) ?if(one%2=0);改成?if(one%2==0)