what is wrong with the following interffacepublic interfface something is wrong{void aMethod(int aValue){System.out.println("hi mom"):}}

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 19:52:30

what is wrong with the following interffacepublic interfface something is wrong{void aMethod(int aValue){System.out.println("hi mom"):}}
what is wrong with the following interfface
public interfface something is wrong{
void aMethod(int aValue){
System.out.println("hi mom"):
}
}

what is wrong with the following interffacepublic interfface something is wrong{void aMethod(int aValue){System.out.println("hi mom"):}}
首先,你的接口关键字就错了,是interface ,你多了一个f,命名规则也错了,看下命名规则吧,不能用空格的,只能用下划线或字母或数字,并且不能数字开头;
还有,接口里面不能有方法体的大哥.