Arrays

Arrays

9th - 12th Grade

20 Qs

quiz-placeholder

Similar activities

ULangan Spreadsheet 2 Date time

ULangan Spreadsheet 2 Date time

12th Grade

20 Qs

Review for test 3 - APCS Principles Building Apps

Review for test 3 - APCS Principles Building Apps

9th - 12th Grade

18 Qs

Java Review

Java Review

12th Grade

25 Qs

JavaScript and Graphics

JavaScript and Graphics

12th Grade

17 Qs

Revisão de Programação Java

Revisão de Programação Java

9th Grade - University

15 Qs

Algorithms and Recursion Review

Algorithms and Recursion Review

11th Grade

18 Qs

Functions in Python

Functions in Python

9th - 12th Grade

16 Qs

Season 5 #Spaic Python Weekly Quiz

Season 5 #Spaic Python Weekly Quiz

KG - Professional Development

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?