//To illustrates the lifecycle of the applet
import java.awt.*;
//<applet code="applet2" width=300 height=100></applet>
class applet2 extends java.applet.Applet
{
String name;
public void init()
{
String name="G.S.Baluja";
}
public void paint(Graphics g)
{
g.drawString(name,50,50);
}
public void start()
{
name="this is the start method";
}
public void stop()
{
name="this is the stop method";
}
}