READINGS FOR THE NEXT 2 WEEKS re-read Chapter 8 Objects re-read pg 141-147 Chapter 9 -> 9.4 Array p. 81-98 ALL of Chapter 6 148 -> 161 ALL of Chapter 9 191-195 Chapter 11: Debugging operators != not equal == exactly equal && and (disjunction) || or (disjunction) ! not (negation prefix) polynomial AnX^n - a2X^2 +a1X^1... [] for writing subscript Arrays an array ordered collection of values, all of the same type (homogeneous data aggregate) int a[]; int [] a; each of the values (called "elements" of the array) is identified by a number (called an "index" or "subscript") which is enclosed within square breakcets ([]). This Java statement assings a values (12) to an element of an array named "a". |---> a[3]= 5+7 before it can be used, an array must first be declared with a type and a name. An array declaration specifies a TYPE followed by empty square brackets []. int[]a; to indicate that it is an array of this type, and the array is given a NAME (which is valid within the "scope" of the declaration statement). Before values can be stored within an array, its SIZE must be specified so that the array can be created in memory ("constructed" or "instantiated"). This Java statement specifies that the array "a" has ten elements. a = new int[10]; note that the two actions (declaration and construction) may be combined in a single Java statement. int[]a=new int[10]; int many=5; int[]a=new int[many]; int j=0 a[j++]=10 a[j++]=11 a[j++]=12 a[j++]=13 a[j++]=14