Arrays

Arrays

10th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

EMPTECH L4 Q3

EMPTECH L4 Q3

12th Grade

10 Qs

Memahami PBO

Memahami PBO

11th Grade - University

15 Qs

Parcial 2 - Robótica

Parcial 2 - Robótica

11th Grade

10 Qs

Network

Network

10th - 11th Grade

10 Qs

فيجوال بيسك

فيجوال بيسك

10th Grade

11 Qs

TIN 11 - PYTHON - PHÉP TOÁN - BIỂU THỨC - CÂU LỆNH GÁN

TIN 11 - PYTHON - PHÉP TOÁN - BIỂU THỨC - CÂU LỆNH GÁN

11th Grade

10 Qs

Ulangan harian 1 Algoritma dan Pemrograman

Ulangan harian 1 Algoritma dan Pemrograman

12th Grade - University

13 Qs

QBASIC Programming

QBASIC Programming

5th - 10th Grade

10 Qs

Arrays

Arrays

Assessment

Quiz

Computers

10th - 12th Grade

Practice Problem

Medium

Created by

Daniel Wespetal

Used 525+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

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

Number: 2
Number: 7
Number: 4
Number: 12

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

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

Number: 2
Number: 7
Number: 4
Number: 12

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

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]);

Number: 2
Number: 0
Number: 12
Number: 6

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

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

4
5
6
7

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What is the correct way to initialize an array with 10 positions?

int numbers = new int[10];
int[] numbers = new int[];
int[10] numbers = new int[10];
int[] numbers = new int[10];

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

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

null
1
0
nothing

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

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

Mack
Dennis
Dee
Charlie

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

Already have an account?