|
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 FindExtremes
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[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 nums=this assignment operator makes the left side equal to the right side{open braces start code blocks and must be matched with a close brace3, 65, 2, 67, 1, 45, 23, -2, 6}close braces end code blocks and must match an earlier open brace;
10
11 intint is the type for whole numbers and it is short for integer min=this assignment operator makes the left side equal to the right sidenums[brackets are typically used to declare, initialize and index (indicate which element of) arrays0]brackets are typically used to declare, initialize and index (indicate which element of) arrays;
12 System.out.println("Starting minimum: "+adds two numbers together or concatenates Strings togethermin);
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 side1; i<nums.length; i++this is the increment operator, which increases the variable by 1)
14 {open braces start code blocks and must be matched with a close brace
15 System.out.println("Looking at: "+adds two numbers together or concatenates Strings togethernums[brackets are typically used to declare, initialize and index (indicate which element of) arraysi]brackets are typically used to declare, initialize and index (indicate which element of) arrays);
16 ifif executes the next statement only if the condition in parenthesis evaluates to true(nums[brackets are typically used to declare, initialize and index (indicate which element of) arraysi]brackets are typically used to declare, initialize and index (indicate which element of) arrays<min)
17 {open braces start code blocks and must be matched with a close brace
18 System.out.println("Exceeded extreme.");
19 min=this assignment operator makes the left side equal to the right sidenums[brackets are typically used to declare, initialize and index (indicate which element of) arraysi]brackets are typically used to declare, initialize and index (indicate which element of) arrays;
20 }close braces end code blocks and must match an earlier open brace
21 System.out.println("Minimum is now "+adds two numbers together or concatenates Strings togethermin);
22 }close braces end code blocks and must match an earlier open brace
23 System.out.println("Finally, the minimum is "+adds two numbers together or concatenates Strings togethermin);
24 }close braces end code blocks and must match an earlier open brace
25 }close braces end code blocks and must match an earlier open brace
|