import java.applet.Applet;
import java.awt.Graphics;
public class HelloWorld extends Applet {
public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);
}
}
<html> <head> <title>HelloWorld Applet</title> </head> <body> <center> This is the HelloWorld Applet. <br> <applet code = "HelloWorld.class" width = 150 height = 50> </applet> </center> </body> </html>