araesf araesf
  • 16-05-2021
  • Computers and Technology
contestada

I'm reviewing a test and can't get past this problem:

What is the difference between printing (n) and printing row[n]?

Im reviewing a test and cant get past this problem What is the difference between printing n and printing rown class=

Respuesta :

codiepienagoya codiepienagoya
  • 21-05-2021

Answer:

The answer is "Option A"

Explanation:

Following are the complete code to these question:

public class Main//defining a class-main

{

public static void main(String[] args)//main method  

{

        int [][] numbers={{1, 2, 3},{4,5,6}}; //defining 2D array numbers

for(int[] row : numbers) //use for loop that holds all array value into 1D  array

{

for (int n: row)//defining n variable that holds row array values  

{

System.out.print (n); //print n variable value

}

}

}

}

Answer Link

Otras preguntas

When was the jazz Age A. After World War I B. Before the Civil War C. Before the Lost Generation D. After the Great Depression
A person who brings things into the country illegally
In your opninion which is better men of faith and character or men of knowledge? Explain!
Solve each equation using elimination. 2a+3b=12 5a- b=13
Why do two flowers of the same species have different color petals
Which exercise could be classified as vigorous? (Points : 2) jumping rope raking leaves ice skating volleyball
Would you expect to see more biodiversity in a phyla or among members of a class?
1/2(x-4)=4. Solve for x
Which is a precept of monotheism? a. Meditation is necessary to achieve harmony with God. b. A supreme god fights against evil in the world. c. Followers must o
what is the value of this proportion? 8/12 = 10/n