Search Header Logo

CSA Unit 7 Test

Authored by Kevin Kamrath

Computers

9th Grade

Used 4+ times

CSA Unit 7 Test
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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

Access all questions and much more by creating a free account

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?