A Java applet is a program that runs inside a web browser or an applet viewer, rather than a standalone application. In order to see it, you have to define an HTML page that will contain the specific applet tags. To see the applet, we can either point out browser to the URL of the HTML file, or use the appletviewer program.
Web browsers store the applet code in the cache directory.
If we are doing any change to the code and want to see the new applet, we need to close and reopen the web browser. Therefore, for debugging, it is better to use the appletviewer. To compile a java program, we use the javac compiler. In Java every compiled class is stored in a separate file. The name of the file is the same with the name of the class and should have the .java extension.