Java Interview Questions
1 .
what are the subclasses of the Container class?
The Container class has three major subclasses. They are : 

• Window 
• Panel 
• ScrollPane 
2 .
what is the difference between a Scollbar and a Scrollpane?
A Scrollbar is a Component, but not a Container. A Scrollpane is a Container and handles its own events and performs its own scrolling.
3 .
what is an Applet?
An applet represents java byte code embedded in a web page.
4 .
where are applets executed?
Applets are executed by a program called applet engine which is similar to virtual machine that exists inside the web browser at client side.
5 .
what is Applet life cycle?
An applet is born with init() method and starts functioning with start() method. To stop the applet, the stop() method is called and to terminate the applet completely from memory, the destroy() method is called. Once the applet is terminated, we should reload the HTML page again to get the applet start once again from init() method. 

This cyclic way of executing the methods is called applet life cycle.
6 .
what is HotJava?
HotJava is the first applet-enabled browser developed in java to support running of applets.
7 .
which tag is used to embed an applet into a HTML page?
<Applet> tag is used to insert an applet into HTML page.
8 .
what is the sequence for calling the methods by AWT for applets?
When an applet begins, the AWT calls the following methods, in this sequence:
  1. init()
  2. start()
  3. paint()
When an applet is terminated, the following sequence of method calls takes place :
  4. stop()
  5. destroy()
9 .
What is an Applet? Should applets have constructors?
Applets are small programs transferred through Internet, automatically installed and run as part of web-browser. Applet implements functionality of a client. Applet is a dynamic and interactive program that runs inside a Web page displayed by a Java-capable browser. We don’t have the concept of Constructors in Applets. Applets can be invoked either through browser or through Appletviewer utility provided by JDK. 
10 .
ShowStAnswer: Ttus() ?
To display the message at the bottom of the browser when applet is started.