Integer Array Instantiation
Which of the following statements correctly instantiates an integer array named testGrades with a length of 5?
A
int[] testGrades = new int[5];
B
int[] testGrades = {5};
C
int testGrades = new int[5];
D
int testGrades[] = new int(5);
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | bommasam000 | 3 | 3 | 1m 24s | 216 |
| #2 | singhris000 | 1 | 1 | 0m 19s | 81 |
| #3 | y.seong2027 | 1 | 1 | 1m 06s | 34 |
| #4 | sailajavadlamani33 | 1 | 2 | 1m 44s | -14 |
Items per page:
10
1 – 4 of 4
