araesf araesf
  • 16-05-2021
  • Advanced Placement (AP)
contestada

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

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

AP CSA Question 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:

Complete Code:

public class Arr//defining a class-Arr  

{

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

}

}

}

}

The code comment explains its functioning.

Answer Link

Otras preguntas

Which viewpoint does Banneker convey in “Benjamin Banneker Writes to Thomas Jefferson”? Black and white Americans share similar perspectives on freedom and just
What term refers to a person's position in society CA role OBrole set C status D status set
4. What is our duty towards senior citizens? Write in 4 points​
Find the values of all 6 trigonometric functions for the angle inside right triangle where the opposite side of the angle is 9 cm and hypothenuse of the triangl
Help me help help help help help
answer plssssssssssssssssssssssssssssss
Reduce to simplest form -7/12+3/8​
2. Choose the correct answer to 263 = 4. 54 R7 65 R3 65 65 R2
what is offer and then how can give example for the offer​
2. You may submit your answer to question l in essay form here. (0 points) If you are unable to submit your answer to question 1 in audio form, you may submit y