import java.applet.*;
import java.awt.*;
 
 

 //All applets must be declared public
public class HelloWorld extends Applet{

 //Declare the String object
 String text;

 //this method does the initializing
   public void init(){

 text="Hello World";

 }
 

 //This method paints the graphic to the applet
 //in this example only the String Hello world
 //If you want another text, just change the init method
   public void paint(Graphics g){

 //actually paints the string in position 20,20
 g.drawString(text,20,20);

 }
}