为什么第一串字符(three1)输出的是300

public class HelloWorld{

    public static void main(String[] args) {

   int one = 10 ;

        int two = 20 ;

        int three = 0 ;

        int three1=one+two;

        int three2=three1+=one;

        int three3=three1-=one;

        int three4=three1*=one;

        int three5=three4/=one;

        int three6=three%=one;

        System.out.println(three1);

        System.out.println(three2);

        System.out.println(three3);

        System.out.println(three4);

        System.out.println(three5);

        System.out.println(three6);

        



0_子朔_0
浏览 1150回答 1
1回答

蜂之谷

int three2=three1+=one;  --> three1 = 30+10 = 40 int three3=three1-=one;  --> three1 = 40-10 = 30    int three4=three1*=one;  --> three1 = 30*10 = 300
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java