Owl Teach Yourself Java 2 in 21 Days, Third Edition
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / THANKS
ROGERS CADENHEAD

Day 14: Writing Java Applets

Certification Practice

Each chapter of the book ends with a Certification Practice question that's comparable to what you could expect to be asked on a Java certification test. Here's the answer for chapter 14:

Answer (d) is correct. The init() method is called once when the applet is first created, so you can create the components that make up your interface in this method, just as you would use a frame's constructor method.

Answer (a) is incorrect. Though you could create objects each time the applet window needed to be repainted, the performance of the applet would be hampered by the continual need to keep recreating the objects that make up the graphical user interface.

Answer (b) is incorrect. The start() method is a better choice than the paint() method, but it's still an inefficient way to create and display a graphical user interface.

Answer (d) is incorrect. The stop() method is called when the Web browser displaying the applet leaves that page to load another. Edit

Return to Day 14

   
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / THANKS

Valid HTML 4.01!

Valid CSS!