Study guide: Applications, applets, and hybrids

Brush up on Java terms, learn tips and cautions, review homework assignments, and read Jeff’s answers to student questions

INDEXHEAD: Glossary of terms

application
A standalone program consisting of at least one class with a main() method.
applet
An application that runs in the context of a Web browser that controls the applet.
applet parameter
An external name/value pair that provides configuration information to an applet.
hybrid
A program that can run as either a standalone application or a browser-dependent applet.

INDEXHEAD: Tips and cautions

These tips and cautions will help you write better programs and save you from agonizing over why the compiler produces error messages.

Tips

  • In public static void main(String [] args), you do not need to specify args. You can specify any legal identifier in place of args.
  • Case is not significant in the filename that you specify with appletviewer. For example, either appletviewer Lifecycle.html or appletviewer lIFEcyCle.html is valid.

Cautions

  • You must always specify the .java file extension when using Sun’s javac compiler to compile a source file.
  • You must never specify the .class file extension when using Sun’s java application launcher to run an application.

INDEXHEAD: Miscellaneous notes and thoughts

INDEXHEAD: Homework

Compile the source code in “Applications, Applets, and Hybrids and run the resulting class files.

You’ll find all source and resource files such as duke.gif and giggle.wav in http://www.javaworld.com/jw-11-2000/java101/jw-1103-java101.zip.

Source: www.infoworld.com