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 importimport means to make the classes and/or packages available in this program fang.*;
05 importimport means to make the classes and/or packages available in this program lights.*;
06 importimport means to make the classes and/or packages available in this program java.util.*;
07 /**
08 * All about my application here.
09 * @authorthis is the Javadoc tag for documenting who created the source code Jam Jenkins
10 */
11 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 AllObject
12 {open braces start code blocks and must be matched with a close brace
13 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)
14 {open braces start code blocks and must be matched with a close brace
15 //ArrayList<String> all="happy";
16 Object all=this assignment operator makes the left side equal to the right side"happy";
17 Wiki.out.println("all is "+adds two numbers together or concatenates Strings togetherall.toString());
18 all=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor ArrayList<String>();
19 Wiki.out.println("all is "+adds two numbers together or concatenates Strings togetherall.toString());
20 all=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor OvalSprite(1, 1);
21 Wiki.out.println("all is "+adds two numbers together or concatenates Strings togetherall.toString());
22 all=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor LightsOutModel();
23 Wiki.out.println("all is "+adds two numbers together or concatenates Strings togetherall.toString());
24
25 ArrayList everyThing=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor ArrayList();
26 everyThing.add(newnew is used to create objects by calling the constructor Integer(5));
27 everyThing.add("Happy");
28 intint is the type for whole numbers and it is short for integer x=this assignment operator makes the left side equal to the right side((Integer)everyThing.get(0)).intValue();
29
30 ArrayList<Integer> easier=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor ArrayList<Integer>();
31 easier.add(5);
32 //easier.add("Happy");
33 intint is the type for whole numbers and it is short for integer y=this assignment operator makes the left side equal to the right sideeasier.get(0);
34 }close braces end code blocks and must match an earlier open brace
35 }close braces end code blocks and must match an earlier open brace
|
Download/View jam/AllObject.java