int[] score = new int[3]; int score[]; // declares the array variable, allocating just 1 reference variable
score = new int[3]; // constructs the actual array, allocating 3 integer variables
char[] card;
String entries[];
int[] score = {100, 95, 97};
score = {100, 95, 97};" on a line by itself, or score = 0;"
void get_hours(int[] hours);
System.out.println("You entered:");
for (i=0; i < size; i++)
System.out.print(inputNums[i] + " ");
System.out.println("You entered:");
for (double num : inputNums)
System.out.print(num + " ");
int[][] pixels = new int[480][640]; pixels[3][5] = 7;pixels[5]
void clearScreen(int[][] p)
{
int x, y;
for (y=0; y < p.length; y++)
{
for (x=0; x < p[y].length; x++)
p[y][x] = 0;
}
}
We would call the above function with the following function call: clearScreen(pixels);