Applet Interview Question and Answers

1. What is an applet?
  Applet is a dynamic and interactive program that runs inside a web page displayed by a java capable browser.
 
Your Name Your Email-ID
Your Answer
2. How will you initialize an applet?
  By including the initialization code in the init() method.
 
Your Name Your Email-ID
Your Answer
3. What is the lifecycle of an applet?
 
  • init() method – can be called when an applet is first loaded.
  • start() method –can be called each time an applet is started.
  • paint() method – can be called when the applets is minimized or maximized.
  • stop() method – can be used when the browser moves off the applet’s page.
  • destroy() method – can be called when the browser is finished with the applet.
 
Your Name Your Email-ID
Your Answer
4. How do you set security in applets?
  Using setSecurityManager() method.
 
Your Name Your Email-ID
Your Answer
1234 Page 1 of 4