CSA Unit 7 Test

CSA Unit 7 Test

9th Grade

20 Qs

quiz-placeholder

Similar activities

AP CSP Unit 5 Review: Lists, Loops and Traversals

AP CSP Unit 5 Review: Lists, Loops and Traversals

9th - 12th Grade

19 Qs

Computer Science (Python)

Computer Science (Python)

9th Grade

18 Qs

Practice <ultiple Choice - APCSA

Practice <ultiple Choice - APCSA

9th - 12th Grade

18 Qs

CP M.8.1-8.5 Quiz Review

CP M.8.1-8.5 Quiz Review

9th - 12th Grade

15 Qs

Java Arrays and ArrayLists

Java Arrays and ArrayLists

9th - 12th Grade

25 Qs

APCSA Topic 7

APCSA Topic 7

9th - 12th Grade

25 Qs

Python - lists,loops,basics

Python - lists,loops,basics

9th - 11th Grade

20 Qs

HTML

HTML

9th - 12th Grade

15 Qs

CSA Unit 7 Test

CSA Unit 7 Test

Assessment

Quiz

Computers

9th Grade

Medium

Created by

Kevin Kamrath

Used 4+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the proper way to get the number of items in an ArrayList called list?

list.length

list.size

list.length()

list.size()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will the following code print?

Hello

World

list[0]

There will be a compiler error

None of the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is wrong with the following code?

It will throw an IndexOutOfBoundsException.

You cannot use int as the type in an ArrayList.

list is a reserved word, so you can’t call the variable that.

You need to define the new ArrayList on a new line of code.

Nothing. The above code is correct.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will the following code print?

0

5

6

9

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will the following code print?

3

coding

in

Java

6.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Media Image

Consider the following statement:

I

II

III

None

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What would the proper initialization and declaration be for an ArrayList myTemps meant to store precise temperature measurements?

ArrayList<double> myTemps = new ArrayList<double>();

ArrayList<Double> myTemps = new ArrayList<Double>();

ArrayList<Integer> myTemps = new ArrayList<Integer>();

ArrayList<double> myTemps = ArrayList<double>();

ArrayList<Double> myTemps = ArrayList<Double>();

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?