InterviewSolution
| 1. |
What Is The Destroy Method? |
|
Answer» Each time your applet ends, Java automatically calls the DESTROY method to free up memory the applet was using. The destroy method is the compliment of the init method. However, you normally do not need to override, the destroy method unless you have specific resources that you need to remove, such as large GRAPHICAL files or special threads that your applet has created. In short, the destroy method PROVIDES a convenient way to group your applet's "clean up" processing into ONE location, as shown: PUBLIC void destroy() { // Statements here }Each time your applet ends, Java automatically calls the destroy method to free up memory the applet was using. The destroy method is the compliment of the init method. However, you normally do not need to override, the destroy method unless you have specific resources that you need to remove, such as large graphical files or special threads that your applet has created. In short, the destroy method provides a convenient way to group your applet's "clean up" processing into one location, as shown: |
|