
JAVA 2D ARRAYS

Quiz
•
Computers
•
University
•
Medium

KAMESWARA RAO
Used 204+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Given the code, what is in values[2][1] ?
7.9
9.2
7.3
0.5
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Given the code, what is the value of things.length ?
4
3
12
7
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Given the following:
double [][] stuff ;
Which of the following statements constructs an array with 5 rows of 7 columns each and assign its reference to stuff ?
stuff = new stuff[5][7] ;
stuff = new double[5][7] ;
new stuff = double[5][7] ;
stuff = double new[5][7] ;
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How would you get the value "6" out of the following array?
a [0][3]
a [1][3]
c) a[0][2]
d) a[2][0]
e) a[3][1]
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What would the statement a[1].length return?
3
4
2
1
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following statements correctly declares a two-dimensional integer array?
int Matrix[ ] = new int[5,4];
int Matrix[ ]; Matrix = new int[5,4];
int Matrix[ ][ ] = new int[5][4];
int Matrix[ ][ ] = int[5][4];
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How would you get the value 6 out of the following array int[][] a = {{2, 4, 6, 8}, {1, 2, 3, 4}};? Remember each set of curly braces represents a row, or a single dimensional array.
a [0][3]
a [1][3]
c) a[0][2]
d) a[2][0]
e) a[3][1]
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Removal - Part 1

Quiz
•
University
25 questions
AP CSA Unit 1&2 Test

Quiz
•
8th Grade - Professio...
15 questions
Flutter intro and Dart quiz

Quiz
•
University
23 questions
Beginning C Programming

Quiz
•
University
15 questions
Java

Quiz
•
University
20 questions
Apuntadores en C

Quiz
•
University
20 questions
Operator in C

Quiz
•
University
20 questions
C Programming

Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
11 questions
NFL Football logos

Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms

Quiz
•
11th Grade - University
20 questions
La Hora

Quiz
•
9th Grade - University
7 questions
Cell Transport

Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?

Interactive video
•
4th Grade - University