When an applet begins, which of the following sequence methods is CORRECT? 1) start() 2) paint() 3) init()
When an applet begins, which of the following sequence methods is CORRECT? 1) start() 2) paint() 3) init() Correct Answer 3, 1, 2
Concept
It is important to understand the order in which the various methods shown in the skeleton are executed. When an applet begins, the following methods are called in this sequence:
1. init( )
2. start( )
3. paint( )
When an applet is terminated, the following sequence of method calls takes place:
1. stop( )
2. destroy( )
The init( ) method is the first method to be called. In init( ) your applet will initialize variables and perform any other startup activities.
The start( ) method is called after init( ). It is also called to restart an applet after it has been stopped, such as when the user returns to a previously displayed Web page that contains an applet.
Hence correct option is 2