The Applets are used to provide interactive features to web applications that cannot be provided by HTML alone. They can capture mouse input and also have controls like buttons or check boxes. In response to user actions, an applet can change the provided graphic content.
Simple example of applet-
import java.applet.*;
import java.awt.*;
publicclassHelloWorldAppletextendsApplet{
publicvoid paint (Graphics g){
g.drawString ("Hello World",25,50);
}
}