宝慕林9507558
2019-04-09 22:05
public class HelloWorld{
public static void main(String[] args) {
int one = 10 ;
int two = 20 ;
int three = 0 ;
System.out.println("three = one + two ==>" + three);
three += one;
System.out.pringln("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 );
少了three=one+two的计算,第二个println打错了。
public class HelloWorld{
public static void main(String[] args) {
int one = 10 ;
int two = 20 ;
int three = 0 ;
three = one + two;
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 );
}
}
Java入门第一季(IDEA工具)升级版
1165565 学习 · 17587 问题
相似问题