Question: Which of these array declaration statements are not legal? Select the two correct answers. (a) int[] i[] = { { 1, 2 }, { 1

Which of these array declaration statements are not legal? Select the two correct answers.

(a) int[] i[] = { { 1, 2 }, { 1 }, {}, { 1, 2, 3 } };

(b) int i[] = new int[2] {1, 2};

(c) int i[][] = new int[][] { {1, 2, 3}, {4, 5, 6} };

(d) int i[][] = { { 1, 2 }, new int[ 2 ] };

(e) int i[4] = { 1, 2, 3, 4 };

Step by Step Solution

3.42 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

b and e The size of the array cannot be specified as in b and e The s... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming 8th Questions!