|
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 InsertDelete
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) 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)
11 {open braces start code blocks and must be matched with a close brace
12 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 catBox=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor String[brackets are typically used to declare, initialize and index (indicate which element of) arrays8]brackets are typically used to declare, initialize and index (indicate which element of) arrays;
13 catBox[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=this assignment operator makes the left side equal to the right side"juniper";
14 catBox[brackets are typically used to declare, initialize and index (indicate which element of) arrays1]brackets are typically used to declare, initialize and index (indicate which element of) arrays=this assignment operator makes the left side equal to the right side"cinnamon";
15 catBox[brackets are typically used to declare, initialize and index (indicate which element of) arrays2]brackets are typically used to declare, initialize and index (indicate which element of) arrays=this assignment operator makes the left side equal to the right side"kitty";
16 catBox[brackets are typically used to declare, initialize and index (indicate which element of) arrays3]brackets are typically used to declare, initialize and index (indicate which element of) arrays=this assignment operator makes the left side equal to the right side"tilly";
17 catBox[brackets are typically used to declare, initialize and index (indicate which element of) arrays4]brackets are typically used to declare, initialize and index (indicate which element of) arrays=this assignment operator makes the left side equal to the right side"garfield";
18 catBox[brackets are typically used to declare, initialize and index (indicate which element of) arrays5]brackets are typically used to declare, initialize and index (indicate which element of) arrays=this assignment operator makes the left side equal to the right side"bob";
19 Wiki.out.println("Cats are: ");
20 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<catBox.length; i++this is the increment operator, which increases the variable by 1)
21 {open braces start code blocks and must be matched with a close brace
22 Wiki.out.println("Box "+adds two numbers together or concatenates Strings togetheri+adds two numbers together or concatenates Strings together" has "+adds two numbers together or concatenates Strings togethercatBox[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);
23 }close braces end code blocks and must match an earlier open brace
24
25 //inserting Steve at index 4
26 Wiki.out.println("Inserting Steve at box 4");
27 String inserted=this assignment operator makes the left side equal to the right side"Steve";
28 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 sidecatBox.length-2; i>=this evaluates to true if the left side is not less than the right side4; i--this is the decrement operator, which decreases the variable by 1)
29 {open braces start code blocks and must be matched with a close brace
30 catBox[brackets are typically used to declare, initialize and index (indicate which element of) arraysi+adds two numbers together or concatenates Strings together1]brackets are typically used to declare, initialize and index (indicate which element of) arrays=this assignment operator makes the left side equal to the right sidecatBox[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;
31 }close braces end code blocks and must match an earlier open brace
32 catBox[brackets are typically used to declare, initialize and index (indicate which element of) arrays4]brackets are typically used to declare, initialize and index (indicate which element of) arrays=this assignment operator makes the left side equal to the right sideinserted;
33
34 //displaying cats
35 Wiki.out.println("Cats are: ");
36 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<catBox.length; i++this is the increment operator, which increases the variable by 1)
37 {open braces start code blocks and must be matched with a close brace
38 Wiki.out.println("Box "+adds two numbers together or concatenates Strings togetheri+adds two numbers together or concatenates Strings together" has "+adds two numbers together or concatenates Strings togethercatBox[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);
39 }close braces end code blocks and must match an earlier open brace
40
41 //removing Cinnamon from index 1
42 String removed=this assignment operator makes the left side equal to the right sidecatBox[brackets are typically used to declare, initialize and index (indicate which element of) arrays1]brackets are typically used to declare, initialize and index (indicate which element of) arrays;
43 Wiki.out.println("Removing "+adds two numbers together or concatenates Strings togetherremoved+adds two numbers together or concatenates Strings together" from box 1");
44 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<catBox.length-1; i++this is the increment operator, which increases the variable by 1)
45 {open braces start code blocks and must be matched with a close brace
46 catBox[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=this assignment operator makes the left side equal to the right sidecatBox[brackets are typically used to declare, initialize and index (indicate which element of) arraysi+adds two numbers together or concatenates Strings together1]brackets are typically used to declare, initialize and index (indicate which element of) arrays;
47 }close braces end code blocks and must match an earlier open brace
48
49 //displaying cats
50 Wiki.out.println("Cats are: ");
51 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<catBox.length; i++this is the increment operator, which increases the variable by 1)
52 {open braces start code blocks and must be matched with a close brace
53 Wiki.out.println("Box "+adds two numbers together or concatenates Strings togetheri+adds two numbers together or concatenates Strings together" has "+adds two numbers together or concatenates Strings togethercatBox[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);
54 }close braces end code blocks and must match an earlier open brace
55 }close braces end code blocks and must match an earlier open brace
56 }close braces end code blocks and must match an earlier open brace
|