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

an organism is made up of A) a group of tissues working together B) a group of cells working together C) a group of organ systems working together D) a group
Spanish Help please! Pictures posted! Will mark brainliest!!
Which statement describes an advantage enjoyed by monopolies? A. Unions support monopolies because they know workers are treated fairly. B. Consumers tend t
if a car travels 400m in 2o seconds how fast is it going ?
define lan wan & man
Read the poem. The Inchcape Rock by Robert Southey No stir in the air, no stir in the sea, The ship was as still as she could be; Her sails from heaven received
As a result of war, Korea was divided and the north was occupied by
your resume objective should be no more than____sentences
please help asap ((repost))
The leading french sculptor of the late nineteenth century was ________. eiffel carpeaux rodin horta