出现一个错误,求解

来源:3-3 Java中的赋值运算符

FearlessCC

2018-09-29 21:23

error: class, interface, or enum expected }




写回答 关注

3回答

  • qq_Yn特兰蒂斯_FHMUX3
    2018-10-01 23:21:41
    已采纳

    看看你第三个System.ou.println里输出值了么?

  • qq_流年哎_nyzFIJ
    2018-10-01 09:13:20

    "_"没输出three

  • FearlessCC
    2018-09-29 21:23:43

    我的代码:

    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*=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工具)升级版

0基础萌新入门第一课,从Java环境搭建、工具使用、基础语法开始

1165172 学习 · 17581 问题

查看课程

相似问题