public class MainClass { public static void main(String[] argvs) { int[] ints; ints = new int[4]; for (int i = 0; i < ints.length; i++) { ints[i] = i; } } }
dataType[] arrayRefVar; // preferred way. or dataType arrayRefVar[]; // works but not preferred way.
int [] key; Declare an Array of Object References. Threads[] threads;
public class MainClass { public static void main(String[] argvs) { int[] ints; ints = new int[4]; for (int i = 0; i < ints.length; i++) { ints[i] = i; } } }
public class PrimaryClass{ public static void main(String[] argv){ int[5] scores; } }