import java.applet.Applet; import java.awt.Graphics; public class HelloWorld extends Applet { public void paint(Graphics g) { g.drawString("Hello World!", 25, 25); } }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Hello World Example!</title> </head> <body> <h1>Hello World Example!</h1> <applet code="HelloWorld.class" width=275 height=55> </applet> </body> </html>Resultat