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 LightsOutExplorations
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 booleanboolean is a type that is either true or false name;
10 name=this assignment operator makes the left side equal to the right sidefalsefalse is a value for the boolean type and means not true;
11 booleanboolean is a type that is either true or false other;
12 other=this assignment operator makes the left side equal to the right sidefalsefalse is a value for the boolean type and means not true;
13 ifif executes the next statement only if the condition in parenthesis evaluates to true(!this is the not operator, which changes true to false and false to truename ||this is boolean or, meaning if either or both are true then the result is true other)
14 System.out.println("Result is true");
15 elseelse is what happens when the if condition is false
16 System.out.println("Result is false");
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 LightsOutExplorations.java