Save your program file as “FirstApplet.java”. Make sure the filename you use is correct. If you look at the code you will see the statement:
public class FirstApplet extends Applet {
It’s an instruction to call the applet class “FirstApplet”. The filename must match this class name, and have an extension of “.java”. If your file is not saved as "FirstApplet.java", the Java compiler will complain and not compile your applet.


