When is init(),start() called

Showing Answers 1 - 2 of 2 Answers

Raghavendra

  • Aug 18th, 2005
 

init() :--- 
Called by the browser or applet viewer to inform this applet that it has been loaded into the system. It is always called before the first time that the start method is called.  
A subclass of Applet should override this method if it has initialization to perform. For example, an applet with threads would use the init method to create the threads and the destroy method to kill them.  
 
start() :-- 
Called by the browser or applet viewer to inform this applet that it should start its execution. It is called after the init method and each time the applet is revisited in a Web page.  
A subclass of Applet should override this method if it has any operation that it wants to perform each time the Web page containing it is visited. For example, an applet with animation might want to use the start method to resume animation, and the stop method to suspend the animation.  
 
Taken from Sun Java Documentation 
 

  Was this answer useful?  Yes

D.S.Reddy

  • Sep 12th, 2005
 

init()- is called only once , when the browser sends the first request.

start() is called everytime the browser sends the request

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions