subject

A two-dimensional array myArray is to be created with the following contents. {{0, 0, 3},

{0, 0, 0},

{7, 0, 0}}

Which of the following code segments can be used to correctly create and initialize myArray ?

I. int myArray[][] = new int[3][3];
myArray[0][2] = 3;
myArray[2][0] = 7;

II: int myArray[][] = new int[3][3];
myArray[0][2] = 7;
myArray[2][0] = 3;

III: int myArray[][] = {{0, 0, 3}, {0, 0, 0}, {7, 0, 0}};

A) I only.

B) II only.

C) III only.

D) I and III.

E) II and III.

ansver
Answers: 2

Other questions on the subject: Advanced Placement (AP)

image
Advanced Placement (AP), 25.06.2019 20:00, ruchierosanp1n3qw
Julian and morgan obtain a 30-year 4/1 arm at 3.9% with a 3/13 cap structure in the amount of $182,345.? what is the remaining balance on the mortgage after the first four years? $141,062.12 $168,476.64 $172,148.77 $173,946.01
Answers: 2
image
Advanced Placement (AP), 26.06.2019 00:00, mivantechenko9751
Which is the best investment option for a person who wants to make a long-term, tax-free investment? a. traditional ira b. roth ira c.401(k) d. money market account
Answers: 1
image
Advanced Placement (AP), 26.06.2019 19:50, lisaaprice14
30 a town is built on the banks of a small lake on the edge of a desert. after some time, the townspeople discover that water from the lake has become too polluted to use. describe one way that the lake may have been contaminated by the actions of the townspeople, and explain how the townspeople can remediate this problem.
Answers: 3
image
Advanced Placement (AP), 27.06.2019 08:00, mjakabeast24
Colton has trouble remembering information for his tests because he crams the night before. which would be the best study habit for colton to commit to? a. studying a little every day b. studying right before his tests c. studying in the evenings before bed d. studying only on saturdays
Answers: 1