class if{
public static void main (String args[]){
int x = 9;
if (x <= 9){
System.out.println("Yay");
}else{
System.out.println("Yay");
}
}
}
我正在使用编译器从Notepad++文本编辑器中运行此内容,但编译器出现了错误提示:
<identifier> expected class if
,和另一个错误提示:illegal start of expression
。还有一条错误提示:error ";" expected
,总共出现了9个错误。我已经确保匹配所有的
{}
和()
,甚至删除了程序并重新尝试,但结果仍然相同。