我標(biāo)記的地方報錯了,麻煩看下為什么錯了。謝謝
package COM.HelloWorld;
public class Jiafa {
?public static void main(String[] args){
??? int one = 10 ;
??? int two = 20 ;
??? int three = 0 ;
??? intthree=one+two;???
??? int three1=three+=one;
??? int three2=three1-=one;
??? int three3=three2*=one;
??? int three4=three3/=one;
??? int three5=three4%=one;
??? System.out.println(three);
??? System.out.println(three1);
??? System.out.println(three2);
??? System.out.println(three3);
??? System.out.println(three4);
??? System.out.println(three5);
???
???
???
???
???
}
}
2016-11-19
前面用int定義了three后面就不需要重新定義了,而且后面定義的時候中間還沒有空格鍵
2016-11-19
int three = one+ two;? ?
System.out.println(three);
three += one;
System.out.println(three);
three -=one;
System.out.println(three);
three *= one;
System.out.println(three);
three /= one;
System.out.println(three);
three %= one;
System.out.println(three);