/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Let's look at arrays and how to create them. */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ public class Week4Arrays{   System.out.println("Week4Arrays.x = " + Week4Arrays.x);     System.out.println("t.x = " + t.x);     System.out.println("t.y = " + t.y);     System.out.println("y = " + y);   } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* The square brackets after "args" signifies an array */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */    public static void main(String args[]){ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Oh. let's look at some coding styles related to scope first. */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */  //example 1. int i = 0; //yes or no? for(int i=0; i<10; i++){…} //example 2. for(int j=0; j<10; j++…){…} int j = 0; // yes or no? example 3. int i; // yes or no? for(i=0; i<10; i++){…} example 4. void method(int arg){ int arg = 0; // wait, what??!? } example 5. int i; // yes or no? for(i=0; i<10; i++) { for(int i=0; i<10; i++) { //... } }   //usage and declaration: type-of-variable name-of-variable[]; int sample[]; // how much memory is reserved here?   //and, how do we initialize individual items in the array? //answer: without indexes and/or with indexes // to use for displays as we go... // System.out.println("sample = " + sample); } }