From ggc
|
01 /**
02 * All about my application here.
03 * @authorthis is the Javadoc tag for documenting who created the source code Jam Jenkins
04 */
05 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 WeirdNumbers
06 {open braces start code blocks and must be matched with a close brace
07 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)
08 {open braces start code blocks and must be matched with a close brace
09 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 side1;
10 intint is the type for whole numbers and it is short for integer times=this assignment operator makes the left side equal to the right side0;
11 whilewhile is a looping structure for executing code repeatedly(i>0)
12 {open braces start code blocks and must be matched with a close brace
13 i=this assignment operator makes the left side equal to the right sidei*2;
14 times++this is the increment operator, which increases the variable by 1;
15 Wiki.out.println("Executed "+adds two numbers together or concatenates Strings togethertimes+adds two numbers together or concatenates Strings together" times.");
16 }close braces end code blocks and must match an earlier open brace
17 }close braces end code blocks and must match an earlier open brace
18 }close braces end code blocks and must match an earlier open brace
|
Download/View WeirdNumbers.java