2-D Arrays in Java

2-D Arrays in Java

University

20 Qs

quiz-placeholder

Similar activities

RAID and LVM

RAID and LVM

University

15 Qs

Logika & Pemrograman (ID)

Logika & Pemrograman (ID)

10th Grade - Professional Development

20 Qs

7333-Redes e Comunicação de Dados

7333-Redes e Comunicação de Dados

University

15 Qs

CN_Minor2

CN_Minor2

University

20 Qs

Logic Based Testing

Logic Based Testing

University

15 Qs

DIAGRAMAS UML DE CLASE

DIAGRAMAS UML DE CLASE

University

20 Qs

Briefing Besar PIM III

Briefing Besar PIM III

University

20 Qs

Aptitude Assessment 2

Aptitude Assessment 2

University

15 Qs

2-D Arrays in Java

2-D Arrays in Java

Assessment

Quiz

Computers

University

Hard

Created by

Thomas Martinez

FREE Resource

AI

Enhance your content

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

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

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

Media Image

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

Media Image

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

Media Image

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

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?