求高手帮忙:编译Java程序时出错需要"class"或"interface"
源程序为:
import java.applet.Applet;
import java.awt.Graphics;
pulic class HelloWorld extends Applet{
public void paint(Graphics g){
g.drawString("Hello World!",50,25);
}
}
用javac HelloWorld.java命令后:
HelloWorld.java:4:需要"class"或"interface"
public class HelloWorld extends Applet{
^
1 错误
参考答案:你把public写成pulic了