Write the statement to assign 95 to the initial element of an int array scores |
scores[0] = 95; |
|
| Complete this code to initialize an integer array containing the prime numbers less than 10 (They are 2, 3, 5, 7, 9) at the time it is declared |
int[] primes = _______________ ;
{ 2, 3, 5, 7, 9 } |
|
Given this statement
double temperatures = new double[12];
the indexes can range from ____ to ____ |
0 11 |
|
You have an int array variable scores of unknown length. Complete this code to find the length of the array. You can assume the scores variable is not null. |
int length = ________________ ;
scores.length |
|
You have an int array variable scores of unknown length. Write the code to assign 98 to the last element of the array. You can assume the scores is not null. |
scores[scores.length - 1] = 98; |
|