Compiler error: “class, interface, or enum expected”

前端 未结 6 1738
时光说笑
时光说笑 2020-11-27 17:29

I have been troubleshooting this program for hours, trying several configurations, and have had no luck. It has been written in java, and has 33 errors (lowered from 50 befo

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-27 18:16

    Look at your function s definition. If you forget using "()" after function declaration somewhere, you ll get plenty of errors with the same format:

     ... ??: class, interface, or enum expected ...
    

    And also you have forgot closing bracket after your class or function definition ends. But note that these missing bracket, is not the only reason for this type of error.

提交回复
热议问题