Home Segments Top Top Previous Next

35: Mainline

At this point, you are ready to embed the main method in a class definition. Because you are defining a demonstration program, you name the class Demonstrate.

You must store the definition of the Demonstrate class in a source file. The source file's file name must be Demonstrate, the name of the class contained in the file, and the source file's extension must be java.