Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 11 pts Data in a table or a matrix can be represented using a _____ arr

ID: 3811671 • Letter: Q

Question

Question 11 pts

Data in a table or a matrix can be represented using a _____ array.

(Hint: Please use the wording from the book.)

Flag this Question

Question 21 pts

Which of the following is the correct way to create a two-dimensional array of 5-by-4 char values.

Flag this Question

Question 31 pts

How many rows are in the following two-dimensional array?

int[][] matrix = new int[10][5];

Flag this Question

Question 41 pts

How many columns are in the following two-dimensional array?

String[][] phrases = new String[5][4];

Flag this Question

Question 51 pts

int[][] numbers = {{1,2,3},{4,5,6},{7,8,9}};

Using the above array declaration, how would we display the value of 7?
We would enter: System.out.println(numbers[  ][ ]);

Flag this Question

Question 61 pts

A ____ array is a type of two-dimensional array that has rows of different lengths.

Flag this Question

Question 72 pts

Which of the following statements are valid? (Choose all the apply.)

Flag this Question

Question 8

When passing a two-dimensional array to a method, the ___ of the array is passed to the method.

(Hint: Please use the textbook wording.)

char letters[][] = new char[5][4]

Explanation / Answer

Question 11

Two-dimensional array – This is being used to store a table and matrix form of data

Question 21

char[][] letters = new char[5][4];

Question 31 pts

10 rows , the first dimension indicates number of rows and second dimension indicates number of columns.

Question 51 pts

System.out.println(numbers[2][0]);

The value 7 is at 3’rd row and 1 first column use the index 2 and 0 to access the same.

Question 61 pts

ragged array

Question 72 pts

int[][] y = new int[3][];

int[][] z = {{1,2}};

int[][] m = {{1,2},{2,3}};

int[][] n = {{1,2},{2,3},};

Question 8

Address – Normally address of the array is being passed in the method as a pointer

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote