Arrays

Arrays

9th - 12th Grade

20 Qs

quiz-placeholder

Similar activities

Python - Selection (IF statements)

Python - Selection (IF statements)

9th - 12th Grade

17 Qs

bài tập mảng tiết 1

bài tập mảng tiết 1

11th Grade

15 Qs

AP Comp Sci Principles Unit 7

AP Comp Sci Principles Unit 7

10th - 12th Grade

15 Qs

28.02 C sharp

28.02 C sharp

12th Grade

15 Qs

Menggunakan Array dan Fungsi

Menggunakan Array dan Fungsi

11th Grade

15 Qs

Season 1 #Spaic Python Weekly Quiz

Season 1 #Spaic Python Weekly Quiz

KG - Professional Development

20 Qs

The Barcode scanner

The Barcode scanner

9th - 11th Grade

20 Qs

Accountancy

Accountancy

12th Grade

20 Qs

Arrays

Arrays

Assessment

Quiz

Other

9th - 12th Grade

Medium

Created by

Brianna Kane

Used 69+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Which of the following is FALSE about arrays on Java

A java array is always an object

Length of array can be changed after creation of array

Arrays in Java are always allocated on heap

2.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

What is the length of the following array: byte[] data = { 12, 34, 9, 0, -62, 88 };

1

5

6

12

3.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

How will you identify a single array?
single curly brackets
single square brackets
multiple squares brackets
single angled brackets

4.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

What are the legal indexes for the array ar, given the following declaration:

int[] ar = {2, 4, 6, 8 };

0, 1, 2, 3

1, 2, 3, 4

2, 4, 6, 8

0, 2, 4, 6

5.

MULTIPLE CHOICE QUESTION

5 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

6.

MULTIPLE CHOICE QUESTION

5 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

7.

MULTIPLE CHOICE QUESTION

5 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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?