|
A good answer might be:
|
Compiling AppletsName the source file (the file you create with NotePad) the same as the object it defines. The compiler will create a file of bytecodes called className.class for every class in the source file. As far as the compiler is concerned, the soure file for an applet is just another collection of object definitions. It does not matter that one of the objects is an applet. So it does the same things as it does with applications. So to compile the above applet (contained in file AnotherHello.java) using the command-line interface, do this: This creates AnotherHello.class in your directory.C:\> javac AnotherHello.java If you want, you can copy the above source code into NotePad, save it to AnotherHello.java, and compile it. You will not be able to run it in the usual way, however. |
QUESTION 7:Why will not work to run this applet? Click Here after you have answered the question |