APCS - 2D Array  Packet

APCS - 2D Array Packet

12th Grade

6 Qs

quiz-placeholder

Similar activities

KELAS 12 TKJ (PKK)

KELAS 12 TKJ (PKK)

12th Grade

11 Qs

تحليل الدوال

تحليل الدوال

12th Grade

10 Qs

kuiz sejarah tahun 6

kuiz sejarah tahun 6

12th Grade

10 Qs

DETERMINANTS

DETERMINANTS

12th Grade

11 Qs

Latihan Soal Sejarah Kebudayaan Islam

Latihan Soal Sejarah Kebudayaan Islam

12th Grade

10 Qs

To Change or Not to Change?

To Change or Not to Change?

12th Grade

10 Qs

MGSE.7.G2 (Triangles)

MGSE.7.G2 (Triangles)

KG - University

10 Qs

AKIDAH -SET 2 (TING.5)

AKIDAH -SET 2 (TING.5)

KG - University

10 Qs

APCS - 2D Array  Packet

APCS - 2D Array Packet

Assessment

Quiz

12th Grade

Practice Problem

Medium

Created by

Heather Luman

Used 31+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 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];

2.

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}};? 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]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many columns does a have if it is created as follows

int[][] a = {{2, 4, 6, 8}, {1, 2, 3, 4}};?

3

4

2

1

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given the following:

double[][] things =

{ {1.2, 9.0, 8.7, 1.0},

{9.2, 0.5, 0.0, 5.2},

{7.3, 7.9, 1.2, 3.9} } ;

What is the value of things.length ?

4

3

12

7

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Examine the following:

double[][] values =

{ {1.2, 9.0, 3.2},

{9.2, 0.5, -1.2},

{7.3, 7.9, 4.8} } ;

what is in values[2][1] ?

7.9

9.2

7.3

0.5

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given the following:

double[][] things =

{ {1.2, 9.0, 8.7, 1.0},

{9.2, 0.5, 0.0, 5.2},

{7.3, 7.9, 1.2, 3.9} } ;

What is the value of things[0].length ?

4

3

12

7

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?