How many columns does a have if it is created as follows int[][] a = { {2, 4, 6, 8}, {1, 2, 3, 4}};?
2D Arrays in Java (Review)

Quiz
•
Computers
•
12th Grade
•
Medium
Patrick Bryar
Used 11+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
2
3
4
8
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements assigns the letter S to the third row and first column of a two-dimensional array named strGrid (assuming row-major order).
strGrid[0][2] = "S";
strGrid[1][3] = "S";
strGrid[3][1] = "S";
strGrid[2][0] = "S";
strGrid[0][0] = "S";
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How would you get the value 6 out of the following array int[][] a = { {2, 4, 6, 8}, {1, 2, 3, 4}};?
a[0][3]
a[1][3]
a[0][2]
a[2][0]
a[3][1]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the following code segment, what is the value of sum after this code executes?
4
8
9
12
10
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the contents of mat after the following code segment has been executed?
{ {2 3 3}, {1 2 3}, {1 1 2}, {1 1 1}}
{ {2 1 1}, {3 2 1}, {3 3 2}, {3 3 3}}
{ {2 1 1 1}, {3 2 1 1}, {3 3 2 1}}
{ {2 3 3 3}, {1 2 3 3}, {1 1 2 3}}
{ {1 1 1 1}, {2 2 2 2}, {3 3 3 3}}
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the following code segment, what is the value of sum after this code executes?
4
9
6
10
20
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the contents of arr after the following code has been executed?
{ {6, 4, 2}, {2, 4, 6}}
{ {3, 2, 1}, {1, 4, 6}}
{ {3, 2, 1}, {1, 4, 8}}
{ {4, 4, 2}, {2, 4, 4}}
{ {3, 2, 1}, {2, 4, 4}}
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A two-dimensional array, imagePixels, holds the brightness values for the pixels in an image. The brightness can range from 0 to 255. What does the following method compute?
The maximum brightness value for all pixels in imagePixel
The column with the greatest brightness sum
The most frequent brightness value in imagePixels
The row with the greatest brightness sum
The sum of the total brightness of imagePixels
Similar Resources on Quizizz
11 questions
Digital Imaging

Quiz
•
KG - University
10 questions
Beginning Graphic Design - Images

Quiz
•
9th - 12th Grade
10 questions
Camera Basics Vocabulary

Quiz
•
9th - 12th Grade
10 questions
10 sinf Delphi

Quiz
•
9th - 12th Grade
10 questions
Image Editing Concepts

Quiz
•
8th Grade - University
11 questions
Kuizi 1 - Python

Quiz
•
10th Grade - University
10 questions
AP CSA Unit 1 & 2 Review

Quiz
•
9th - 12th Grade
10 questions
Multimedia Elements

Quiz
•
10th - 12th Grade
Popular Resources on Quizizz
10 questions
Chains by Laurie Halse Anderson Chapters 1-3 Quiz

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
15 questions
Character Analysis

Quiz
•
4th Grade
12 questions
Multiplying Fractions

Quiz
•
6th Grade
30 questions
Biology Regents Review #1

Quiz
•
9th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade
Discover more resources for Computers
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
14 questions
Attributes of Linear Functions

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University
50 questions
Biology Regents Review 2: Ecology

Quiz
•
9th - 12th Grade
20 questions
Investing

Quiz
•
9th - 12th Grade