import java.applet.*; import java.awt.*; public class sample extends Applet{ public void paint(Graphics g){ g.drawString("Hello World!",10,10); } }
<HTML> <BODY> <applet code="sample.class" width=200 height=10></applet> </BODY> </HTML>