誰能幫忙注釋下?
3-3的內(nèi)容完全沒搞懂
public class HelloWorld{
? ? public static void main(String[] args) {
? ? int one = 10 ;
? ? ? ? int two = 20 ;
? ? ? ? int three = 0 ;
? ? ? ? three = one + two;//three = 10+20,所以three是30;
? ? ? ? System.out.println("three = one + two ==> " + three);
? ? ? ? three += one ;
? ? ? ? System.out.println("three += one ==> " + three );
? ? ? ? three -= one ;
? ? ? ? System.out.println("three -= one ==> " + three );
? ? ? ? three *= one ;
? ? ? ? System.out.println("three *= one ==> " + three );
? ? ? ? three /= one ;
? ? ? ? System.out.println("three /= one ==> " + three );
? ? ? ? three %= one ;
? ? ? ? System.out.println("three %= one ==> " + three );
? ? ? ??
? ? ? ??
? ? ? ??
? ? ? ??
? ? ? ??
? ??
}
}
2020-06-25
public class HelloWorld{
? ? public static void main(String[] args) {
? ? int one = 10 ;
? ? ? ? int two = 20 ;
? ? ? ? int three = 0 ;
? ? ? ? three = one + two;? //three = 10+20,所以three是30;
? ? ? ? System.out.println("three = one + two ==> " + three);
? ? ? ? three += one ; ?//three = 30+10,所以three是40;
? ? ? ? System.out.println("three += one ==> " + three );
? ? ? ? three -= one ; ?//three = 40-10,所以three是30;
? ? ? ? System.out.println("three -= one ==> " + three );
? ? ? ? three *= one ;//three = 30*10,所以three是300;
? ? ? ? System.out.println("three *= one ==> " + three );
? ? ? ? three /= one ;//three = 300/10,所以three是30;
? ? ? ? System.out.println("three /= one ==> " + three );
? ? ? ? three %= one ;?//three = 30%10,所以three是0;
? ? ? ? System.out.println("three %= one ==> " + three );
?
}
}