问答详情
源自:3-3 Java中的赋值运算符

帮我看一下为什么three前面为什么不能加int可以吗

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 = one +two ==>"+three);

        int three += one;

          System.out.println("three += one ==>"+three);

         int three *= one;

           System.out.println("three = *= one ==>"+three);

           int three /= one;

            System.out.println("three /= one ==>"+three);

            int three %=one;

             System.out.println("three %=one ==>"+three);

        

提问者:chenkaifan 2018-09-07 21:43

个回答