From ggc
|
01 packagepackage is used to name the directory or folder a class is in ChrisHull;
02 /** I looked at Hpullay program and it looked similar to my original I just couldnt get mine to compile. **/
03 importimport means to make the classes and/or packages available in this program wiki.Wiki;
04 /**
05 * All about my application here.
06 * @authorthis is the Javadoc tag for documenting who created the source code Chull
07 */
08 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 Light
09 {open braces start code blocks and must be matched with a close brace
10 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)
11 {open braces start code blocks and must be matched with a close brace
12 forfor is a looping structure for repeatedly executing a block of code(intint is the type for whole numbers and it is short for integer i=this assignment operator makes the left side equal to the right side0; i<5; i++this is the increment operator, which increases the variable by 1)
13 {open braces start code blocks and must be matched with a close brace
14 /** thisthis means the current object (the implicit parameter) part prints out the line to seperate the boxes. **/
15 Wiki.out.println("--------------");
16 /** thisthis means the current object (the implicit parameter) part puts the box wall and then a 1 forfor is a looping structure for repeatedly executing a block of code each row. **/
17 Wiki.out.println("|"+adds two numbers together or concatenates Strings together(1)+adds two numbers together or concatenates Strings together"|"+adds two numbers together or concatenates Strings together(1)+adds two numbers together or concatenates Strings together"|"+adds two numbers together or concatenates Strings together(1)+adds two numbers together or concatenates Strings together"|"+adds two numbers together or concatenates Strings together(1)+adds two numbers together or concatenates Strings together"|"+adds two numbers together or concatenates Strings together(1)+adds two numbers together or concatenates Strings together"|");
18 }close braces end code blocks and must match an earlier open brace
19 /** thisthis means the current object (the implicit parameter) part sets up the box bottom. **/
20 Wiki.out.println("--------------");
21
22 }close braces end code blocks and must match an earlier open brace
23 }close braces end code blocks and must match an earlier open brace
|
Download/View ChrisHull/Light.java