为什么会编译出这样的结果啊?
public class HelloWorld{
public static void main(String[] args) {
int one = 10 ;
int two = 20 ;
int three = 0 ;
int three=one+two;
System.out.println(three);
int three+=one;
System.out.println(three);
int three-=one;
System.out.println(three);
int three*=one;
System.out.println(three);
double three/=one;
System.out.println(three);
int three%=one;
System.out.println(three);
}
}
结果编译出来的结果是:
/85/1298/Fdvt/HelloWorld.java:8: error: ';' expected
int three+=one;
^
/85/1298/Fdvt/HelloWorld.java:8: error: not a statement
int three+=one;
^
/85/1298/Fdvt/HelloWorld.java:10: error: ';' expected
int three-=one;
^
/85/1298/Fdvt/HelloWorld.java:10: error: not a statement
int three-=one;
^
/85/1298/Fdvt/HelloWorld.java:12: error: ';' expected
int three*=one;
^
/85/1298/Fdvt/HelloWorld.java:12: error: not a statement
int three*=one;
^
/85/1298/Fdvt/HelloWorld.java:14: error: ';' expected
double three/=one;
^
/85/1298/Fdvt/HelloWorld.java:14: error: not a statement
double three/=one;
^
/85/1298/Fdvt/HelloWorld.java:16: error: ';' expected
int three%=one;
^
/85/1298/Fdvt/HelloWorld.java:16: error: not a statement
int three%=one;
^
10 errors