From FANG
|
01 packagepackage is used to name the directory or folder a class is in scg.ch08;
02
03 importimport means to make the classes and/or packages available in this program fang2.core.Game;
04
05 /**
06 * This "game" has no sprites. In setup it just prints "Hello, World!"
07 * to the standard output console. This is a demonstration of how
08 * System.out can be used.
09 */
10 publicpublic is used to indicate unrestricted access (any other class can have access) classclass is a group of fields and methods used for making objects HelloWorld
11 extendsextends means to customize or extend the functionality of a class Game {open braces start code blocks and must be matched with a close brace
12 /**
13 * Print out one line. That is all the setup required
14 */
15 @Override
16 publicpublic is used to indicate unrestricted access (any other class can have access) voidvoid means the method does not return a value setup() {open braces start code blocks and must be matched with a close brace
17 System.out.println("Hello, World!");
18 }close braces end code blocks and must match an earlier open brace
19 }close braces end code blocks and must match an earlier open brace
20
21 //Uploaded on Mon Mar 29 21:38:43 EDT 2010
|
Download/View scg/ch08/HelloWorld.java