这是编译此代码示例时获得的错误。 MyApp.java:8: error: class, interface, or enum expected public int add(int a) { ^ MyApp.java:10: error: class, interface, or enum expectedreturnb; ^ MyApp.java:11: error: class, interface, or enum expected } ^ 3 errors 在Java 中定义枚举时使用额外...
Day.java:92: error: class, interface, orenumexpectedpublicstaticvoidmain(){ ^ Day.java:101: error: class, interface, orenumexpectedSystem.out.print("Enter day to set your day: "); ^ Day.java:103: error: class, interface, orenumexpectedStringstoreday=readinput.nextLine().toLowerCase();...
I have to name all the errors in this code, but I don't know is wrong in class B i got the error class, interface or enum expected. What does that mean? public abstract class A { private double a; public A(A r){ a = r.a; } public A(double a){ this.a = a; } public ...
HelloWorld.java:34: error: class, interface, or enum expected }写回答 关注 1回答 慕函数6145303 2018-04-15 11:20:04 已采纳 //34行:错误:类、接口或enum,, import java.util.Arrays; public class HelloWorld { //完成 main 方法 public static void main(String[] args) { HelloWorld hello=...
HelloWorld.java:1: error: class, interface, or enum expected java.util.Arrays; 报这个错是什么意思是?写回答 关注 2回答 WWWangHan 2017-01-17 11:02:30 直接看英语,大概是说你使用的类,接口与枚举用来与java.util.Arrays. 0 0 慕姐8947874 2017-01-17 10:57:23 在你导入java.util.Arrays类...
netfooserverfooServer.java:10: '.' expected import bi; ^ netfooserverfooServer.java:10: ';' expected import bi; ^ netfooserverfooServer.java:11: class, interface, or enum expected import bj; ^ netfooserverfooServer.java:12: '.' expected ...
error: class, interface, or enum expected问题补充:匿名 2013-05-23 12:21:38 正在翻译,请等待... 匿名 2013-05-23 12:23:18 错误:类、接口或枚举的预期 匿名 2013-05-23 12:24:58 错误: 类、期望的接口或者enum 匿名 2013-05-23 12:26:38 正在翻译,请等待... 匿名 2013-05-23 12:28:...
public class OperateDemo { //public, class首字母小写public static void main(String[] args) { //然后我看你命令行提示main拼错了int x = 4270;x = x/1000*1000;System.out.println(x);}}
MyClass.java:7: error: class, interface, or enum expected public static void myMethod() ^ MyClass.java:10: error: class, interface, or enum expected } ^ 2 errors But if you use eclipse ide, you will get below error. Syntax error on token “}”, delete this token ...