describe methods of basic applet life cycle all


Describe methods of Basic Applet Life Cycle ?

All applets have the subsequent four methods:
public void init();
public void start();
public void stop();
public void destroy();
They have these methods since their superclass, java.applet.Applet, has these methods. (It has others too, but right now I just want to talk about these four.)

In the superclass, these are simply do-nothing methods. For instance,
public void init() {}
Subclasses may override these techniques to accomplish certain tasks at certain times. For example, the init() method is a good place to read parameters that were passed to the applet via tags because it's called exactly once when the applet begin up. Therefore, they do not have to override them. Since they're declared in the superclass, the Web browser can invoke them when it requires to without knowing in advance whether the method is implemented in the superclass or the subclass. This is a excellent example of polymorphism.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: describe methods of basic applet life cycle all
Reference No:- TGS0285124

Expected delivery within 24 Hours