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

Hour 15: Responding to User Input

Notes and Corrections

  • The LottoMadness applet mentioned during this hour is on the Lottorobics page. Edit

Source Files

Reader Questions

  • Question: Why do you often import a class and also one of its sub-classes, as in the KeyView application when you import java.awt.* and java.awt.event.*. Couldn't the first of these statements include the second?
    Answer: Though the names of the java.awt and java.awt.event packages look like they are related, there's no such thing as inheritance for packages in Java. One package cannot be a subpackage of another.
    When you use an asterisk in an import statement, you are making all of the classes in a package available in a program.
    The asterisk only works on classes, not packages. The most a single import statement can load is the classes of a single package. Edit

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.4, Java 1.4, JDK 1.4, SDK1.4, Java 2 SDK 1.4, SDK 1.4, Java 2 version 1.4, 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!