girl前面加a还是an:编译通过了,但无法运行,错误:java.lang.NoClassDefFoundError,求助

来源:百度文库 编辑:高考问答 时间:2024/04/19 01:32:59
class Lesson22
{
public static void main(String args[])
{
int x=0;
try
{
x =System.in.read();
}catch(Exception e){}
while(x !='q')
{
System.out.println((char)x);
try
{
x =System.in.read();
}catch(Exception e){}
}
}
}
运行后出现错误:
Exception in thread "main" java.lang.NoClassDefFoundError: lesson22 (wrong name:
Lesson22)
谢谢大家帮忙了

类定义前加 public