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

Hour 10: Creating Your First Object

Online Interactive Learning Lab

How to create the ModemTester application and the classes Modem, CableModem and DslModem.

Hour 10 Quiz

Question 1. What statement is used to enable one class to inherit from another class?

1.a. inherits

1.b. extends

1.c. handitoverandnobodygetshurt

The extends statement is used because the subclass is an extension of the attributes and behavior of the superclass and of any superclasses above that in the class hierachy.

Question 2. Why are compiled Java programs saved with the .class file extension?

2.a. Java's developers think it's a classy language

2.b. It's a subtle tribute to the world's teachers

2.c. Every Java program is a class

Your programs are always made up of at least one main class and any other classes that are needed.

Question 3. What are the two things that make up an object?

3.a. Attributes and behavior

3.b. Commands and data files

3.c. Spit and vinegar

In a way, b also is true because commands are comparable to behavior, and data files are analogous to attributes.

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!