From ggc
|
01 packagepackage is used to name the directory or folder a class is in jam;
02
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 Jam Jenkins
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 MindBreaker
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) voidvoid means the method does not return a value printNumbers(intint is the type for whole numbers and it is short for integer end)
11 {open braces start code blocks and must be matched with a close brace
12 ifif executes the next statement only if the condition in parenthesis evaluates to true(end==this is the comparison operator which evaluates to true if both sides are the same0)
13 {open braces start code blocks and must be matched with a close brace
14 Wiki.out.println("0");
15 }close braces end code blocks and must match an earlier open brace
16 elseelse is what happens when the if condition is false
17 {open braces start code blocks and must be matched with a close brace
18 printNumbers(end-1);
19 Wiki.out.println(end);
20 }close braces end code blocks and must match an earlier open brace
21 }close braces end code blocks and must match an earlier open brace
22
23 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)
24 {open braces start code blocks and must be matched with a close brace
25 newnew is used to create objects by calling the constructor MindBreaker().printNumbers(10);
26 }close braces end code blocks and must match an earlier open brace
27 }close braces end code blocks and must match an earlier open brace
|
Download/View jam/MindBreaker.java