Arrays

Arrays

Assessment

Flashcard

Computers

10th - 12th Grade

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

10 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What does the following segment of code print out? int[] numArray = { 2, 7, 4, 12, 0, 2 };
System.out.println("Number: " + numArray[2]);

Back

Number: 4

2.

FLASHCARD QUESTION

Front

What does the following segment of code print out? int[] numArray = { 2, 7, 4, 12, 0, 2 };
System.out.println("Number: " + numArray[0]);

Back

Number: 2

3.

FLASHCARD QUESTION

Front

What does the following segment of code print out? int[] numArray = { 2, 7, 4, 12, 0, 2 };
System.out.println("Number: " + numArray[numArray.length - 1]);

Back

Number: 2

4.

FLASHCARD QUESTION

Front

What does the following segment of code print out? int[] numArray = { 2, 7, 4, 12, 0, 2 };
System.out.println(numArray.length);

Back

6

5.

FLASHCARD QUESTION

Front

What is the correct way to initialize an array with 10 positions? Options: int numbers = new int[10];, int[] numbers = new int[];, int[10] numbers = new int[10];, int[] numbers = new int[10];

Back

int[] numbers = new int[10];

6.

FLASHCARD QUESTION

Front

What value is stored in each of the 5 positions in this array? (What is the default value provided by Java).
int[] numbers = new int[5];

Back

0

7.

FLASHCARD QUESTION

Front

What value is at index 1 in this array?  String[] names = {"Mack", "Dennis", "Dee", "Charlie"};

Back

Dennis

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?