Java and Us

Again, you have two options: You can save the files HelloWorld.java and Hello.html on your computer. Then, you can go straight to step b. Or, you can follow these instructions: 1. Start NotePad. Type the following code into a new document:

import java.applet.*;
import java.awt.*;
/** * The HelloWorld class implements an applet that * simply displays "Hello World!". */
public class HelloWorld extends Applet {
public void paint(Graphics g) { // Display "Hello World!"
g.drawString("Hello world!", 50, 25);
}

}

Save this code to a file called HelloWorld.java.

HOME | HISTORY | FEATURE | APPLET | CONTACT US