Java Tutorial

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

public class DynamicString extends Applet
{
        String str;
        public void init()
        {
            str=getParameter(\"string\");
            if (str==null)
            {
                str=\"Java\";
            }
            str=\"Hello\" + str;
        }

        public void paint(Graphics g)
            {
                  g.drawString(str,10,100);
            }
};

 
 
Didn't find what you were looking for? Find more on An applet program that creates string dynamically and displays it