Owl Teach Yourself Java in 24 Hours, Fifth Edition
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / PREVIOUS HOUR / NEXT HOUR / THANKS
ROGERS CADENHEAD

Hour 17: Creating Interactive Web Programs

Online Interactive Learning Lab

How to create the WeightScale application.

Hour 17 Quiz

Question 1. What type of argument is used with the paint() method?

1.a. A Graphics object

1.b. A Graphics2D object

1.c. None

The Graphics object keeps track of the behavior and attributes needed to display things on-screen in the applet window. You might create a Graphicss2D object inside the method, but it isn't sent as an argument.

Question 2. Which method is handled right before an applet finishes running?

2.a. decline()

2.b. destroy()

2.c. defenestrate()

The destroy() method can be used to free up resources used by the applet.

Question 3. Why can't all variables needed in an applet be created inside the init() method?

3.a. The scope of the variables would be limited to the method only

3.b. Federal legislation prohibits it

3.c. They can be created there without any problems

Variables that are used in more than one method of a class should be created right after the class statement but before any methods begin.

Notes and Corrections

  • None.

Source Files

Reader Questions

  • None.

Activities

   
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / PREVIOUS HOUR / NEXT HOUR / THANKS

Search terms used to find this page: Java programming, teach yourself, 24 hours, how to, learn, Sams, Macmillan, Java2, JDK1.5, Java 1.5, JDK 1.5, SDK1.5, Java 2 SDK 1.5, SDK 1.5, Java 2 version 1.5, J2SE 1.5, J2SE 5, Java 2 Standard Edition 1.5, Java 2 Standard Edition 5, Java 2 SDK, Java SDK, Rogers Cadenhead, tutorial, hands-on, source code, code, javac, java, appletviewer, help, learning, applet, application, Java Plug-in, plugin, Swing, GUI, interface, Java2D, IO, Java Web Start, games, novice, beginner, neophyte, rookie

Valid HTML 4.01!

Valid CSS!