From ggc
|
01 packagepackage is used to name the directory or folder a class is in intro;
02
03 importimport means to make the classes and/or packages available in this program wiki.Wiki;
04
05 /**
06 * All about my application.
07 * @authorthis is the Javadoc tag for documenting who created the source code My Name Here
08 */
09 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 LoopReview
10 {open braces start code blocks and must be matched with a close brace
11 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)
12 {open braces start code blocks and must be matched with a close brace
13 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 side5; i<=this evaluates to true if the left side is not more than the right side113; i+=this increases the variable on the left by the value on the right3)
14 {open braces start code blocks and must be matched with a close brace
15 Wiki.out.println("Hello "+adds two numbers together or concatenates Strings togetheri);
16 }close braces end code blocks and must match an earlier open brace
17 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<30; i++this is the increment operator, which increases the variable by 1)
18 {open braces start code blocks and must be matched with a close brace
19 intint is the type for whole numbers and it is short for integer number=this assignment operator makes the left side equal to the right sidei*3+adds two numbers together or concatenates Strings together5;
20 Wiki.out.println("Hello "+adds two numbers together or concatenates Strings togethernumber);
21 }close braces end code blocks and must match an earlier open brace
22 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 side2; i<=this evaluates to true if the left side is not more than the right side128; i=this assignment operator makes the left side equal to the right sidei*2)
23 {open braces start code blocks and must be matched with a close brace
24 Wiki.out.println("Hello "+adds two numbers together or concatenates Strings togetheri);
25 }close braces end code blocks and must match an earlier open brace
26 /*Wiki.out.println("Hello 2");
27 Wiki.out.println("Hello 4");
28 Wiki.out.println("Hello 8");
29 Wiki.out.println("Hello 16");
30 Wiki.out.println("Hello 32");
31 Wiki.out.println("Hello 64");
32 Wiki.out.println("Hello 128");*/
33 }close braces end code blocks and must match an earlier open brace
34 }close braces end code blocks and must match an earlier open brace
|
Download/View intro/LoopReview.java