问答详情
源自: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);

        


提问者:qq__2755 2015-11-09 23:45

个回答

  • 默子
    2015-11-10 09:44:38
    已采纳

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

    println后面不接=号