
2D Arrays
Quiz
•
Computers
•
University
•
Practice Problem
•
Easy
Alicia McNett
Used 3+ times
FREE Resource
Enhance your content in a minute
5 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Complete this code for a 2D array: int[][] temps = ___ int[5][2];
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Complete this for loop code to loop until the end of an array called "grades":
for(int row = 0; row < ___ ; row++) ...
3.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What is missing below order to declare the array as a 3D array:
int[][]___ multiArray;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In 2D arrays, each row must be the same length (e.g. 2D arrays cannot be ragged/jagged).
True
False
Answer explanation
In a 2D array, each row contains an array that consists of the columns. There is nothing stopping a 2D array from having rows of different sizes.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What value prints below?
int[][] vals = { { 1, 2 }, { 3, 4 } };
System.out.println(vals[0][1]);
1
2
3
4
Answer explanation
The first subscript value (0) means "first row".
The second subscript value (1) means "second column" of that row.
Don't forget that index values start at 0.
Similar Resources on Wayground
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University
