• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

When is the destroy() method of an Applet called?

 
Shaan Shar
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When is the destroy() method of an Applet called?

Choice 1
When the user closes the Applets frame.

Choice 2
When the browser is closed.

Choice 3
When the applet becomes temporarily invisible.

Choice 4
When the applet is about to be unloaded from the browser.

Choice 5
java.applet.Applet does not have a destroy() method to override.


:roll:
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The theory of the applet lifecycle is described here. What actually happens is quite easy to test, isn't it?
 
Arun kumar Maalik
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ankur sharma
destroy method is called only when the browser is closed. Because applets are meant to leave on an HTML page, you should not normally leave resources behind after a user leaves the page that contain the applet.
 
Shaan Shar
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankx Ulf and Arun.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic