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

请大神指点一下,下面这代码哪里出错了???

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);
    }
}

提问者:菲尔活该 2015-11-30 09:49

个回答

  • 敞篷帅哥
    2015-11-30 13:08:35

    我用的eclipse环境,你用的什么环境呢?

  • yifei8
    2015-11-30 10:33:02

    可以是你的IDE没有配置好,你可以试试最简单的代码能不能跑