CSA Unit 7 Test

CSA Unit 7 Test

9th Grade

20 Qs

quiz-placeholder

Similar activities

Array List

Array List

9th - 12th Grade

25 Qs

APCSA Unit 7

APCSA Unit 7

9th - 12th Grade

25 Qs

Ap computer science a

Ap computer science a

1st - 12th Grade

15 Qs

Unit 8 - Searching and Sorting

Unit 8 - Searching and Sorting

9th - 12th Grade

15 Qs

CodeHS Arrays

CodeHS Arrays

9th - 12th Grade

18 Qs

Arithmetic Types Declare Initialize Relation Logical Ops

Arithmetic Types Declare Initialize Relation Logical Ops

9th Grade - University

16 Qs

AP CSP Exam Review: Big Idea 3

AP CSP Exam Review: Big Idea 3

8th - 10th Grade

15 Qs

Code.org: Web Development: Unit 2 Lessons 1 - 5 Test

Code.org: Web Development: Unit 2 Lessons 1 - 5 Test

7th - 10th Grade

21 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?