Question: Which of the following is the correct syntax to declare an array of the given six integer values? a. int[] a = {17, -3, 42,

Which of the following is the correct syntax to declare an array of the given six integer values?

a. int[] a = {17, -3, 42, 5, 9, 28};

b. int a {17, -3, 42, 5, 9, 28};

c. int[] a = new int[6] {17, -3, 42, 5, 9, 28};

d. int[6] a = {17, -3, 42, 5, 9, 28};

e. int[] a = int [17, -3, 42, 5, 9, 28] {6};

Step by Step Solution

3.59 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Correct syntax t... 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 Building Java Programs A Back to Basics Approach Questions!