From FANG
|
01 packagepackage is used to name the directory or folder a class is in scg.ch10;
02
03 /**
04 * Greeting program. Standard output forfor is a looping structure for repeatedly executing a block of code a non-FANG console I/O program
05 */
06 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 Hello {open braces start code blocks and must be matched with a close brace
07 /**
08 * The mainThe main method is the place where applications begin executing. program. Just prints out a greeting on standard output.
09 *
10 * @paramthis is the Javadoc tag for documenting the purpose of parameters args command-line arguments; ignored by thisthis means the current object (the implicit parameter) program
11 */
12 publicpublic is used to indicate unrestricted access (any other class can have access) staticstatic means that an instance is not required for access (class level access) voidvoid means the method does not return a value mainThe main method is the place where applications begin executing.(String[brackets are typically used to declare, initialize and index (indicate which element of) arrays]brackets are typically used to declare, initialize and index (indicate which element of) arrays args) {open braces start code blocks and must be matched with a close brace
13 System.out.println("Hello, World!");
14 }close braces end code blocks and must match an earlier open brace
15 }close braces end code blocks and must match an earlier open brace
16
17 //Uploaded on Mon Mar 29 21:40:45 EDT 2010
|
Download/View scg/ch10/Hello.java