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

来源:学生作业学帮网 编辑:学帮网 时间:2024/07/02 09:53:50

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

首先,你的接口关键字就错了,是interface ,你多了一个f,命名规则也错了,看下命名规则吧,不能用空格的,只能用下划线或字母或数字,并且不能数字开头;
还有,接口里面不能有方法体的大哥.