Syntax for Execute this program : Firstly then name of class and file should be and run your java file Syntax : Appletviewer filename.java Example : Appletviewer simple_applet.javaimport java.awt.*;
import java.applet.*; /* <html> <head> </head> <body> <applet code="hello_applet" width=200 height=200> </applet> </body> </html> */ public class hello_applet extends Applet { public void paint(Graphics g) { g.drawString("Hello Friends...",100,100); } }
OUTPUT Hello Friends...