If the array myArray is declared as int[][] myArray = new int[3][4]; Which of th
ID: 3924512 • Letter: I
Question
If the array myArray is declared as
int[][] myArray = new int[3][4];
Which of the following loops will set all the cells of the array equal to 10?
for (int i=0; i for (int j=0; j myArray[i][j] = 10;
for (int i=0; i for (int j=0; j myArray[i][j] = 10;
for (int i=0; i for (int j=0; j myArray[i][j] = 10;
for (int i=0; i for (int j=0; j myArray[i][j] = 10;
for (int i=0; i for (int j=0; j myArray[i][j] = 10;
*** Please select the correct option for the JAVA question and please explain in simple steps why it is the correct answer
If the array myArray is declared as
int[][] myArray = new int[3][4];
Which of the following loops will set all the cells of the array equal to 10?
for (int i=0; i for (int j=0; j myArray[i][j] = 10;
Answers:for (int i=0; i for (int j=0; j myArray[i][j] = 10;
for (int i=0; i for (int j=0; j myArray[i][j] = 10;
for (int i=0; i for (int j=0; j myArray[i][j] = 10;
for (int i=0; i for (int j=0; j myArray[i][j] = 10;
*** Please select the correct option for the JAVA question and please explain in simple steps why it is the correct answer
Explanation / Answer
Declaration :
for (int i=0; i<myArray.length; i++)
for (int j=0; j<myArray[i].length)
myArray[i][j] = 10;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.