UNIT 5 - 2D Arrays

0.0(0)
studied byStudied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/7

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:09 AM on 12/11/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

8 Terms

1
New cards

how to initialize a 2D array

dataType [][] varName = new dataType[row][column] (size of the array)

{{2,3,4}, {3, 4, 5}} to initialize to values

2
New cards

how to access a row in a 2D array?

array name and index number in bracket

3
New cards

how to access a value in a 2D array

name[][]

4
New cards

row-major traversal

(moving left to right and then down)

(row.length {

col[0]. length}}

5
New cards

what does array.length represent?

the NUMBER of rows in an array

6
New cards

what does array[0].length mean?

the number of elements in a row (the number of colums)

7
New cards

column major traversal

reading each column (top to bottom) then shifting right

8
New cards

what is the indexOf(String ch) method?

it tells you the index numbers of the specified string(remeber every string is an array with the characters starting at index 0