Unit 7 - ArrayList - Test Review

Unit 7 - ArrayList - Test Review

9th - 12th Grade

12 Qs

quiz-placeholder

Similar activities

Baze de date-Design

Baze de date-Design

12th Grade

10 Qs

ASESMEN INFORMATIKAN BAB 1 SERI 2

ASESMEN INFORMATIKAN BAB 1 SERI 2

10th Grade

15 Qs

Podsumowanie: binarny, komputer, sieć

Podsumowanie: binarny, komputer, sieć

7th Grade - University

13 Qs

Keyboarding Terms

Keyboarding Terms

9th - 12th Grade

10 Qs

Komputer dan Jaringan Dasar Semester 2 - Implementasi dan Analisis Jaringan

Komputer dan Jaringan Dasar Semester 2 - Implementasi dan Analisis Jaringan

10th Grade

10 Qs

conditional constructs in Java

conditional constructs in Java

10th Grade

10 Qs

Basic Docs

Basic Docs

8th - 9th Grade

17 Qs

Unit 7 - ArrayList - Test Review

Unit 7 - ArrayList - Test Review

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Medium

Created by

Jadzia Hutchings

Used 12+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In what scenario would you use an ArrayList over an array?

I don’t have a lot of memory to store information

I can use a for-each loop on an ArrayList, but not in an array

I need to change the size of an array

I can store objects in an ArrayList, but not in an array

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which index is the last element at in a list called nums?

nums.length

nums.length - 1

nums.size()

nums.size() - 1

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is a reason to use an array instead of an ArrayList?

An array has faster access to its elements than a list does

An array knows it length, but an ArrayList doesn't know its length

An array can determine how many spaces it needs before declaring elements into the array

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the correct way to get the first value in an ArrayList called nums?

nums[0]

nums[1]

nums.first()

nums.get(0)

nums.get(1)

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the correct way to remove the value 3 from the ArrayList nums = [5, 3, 2, 1]?

nums.remove(3);

nums.remove(0);

nums.remove(1);

nums.remove(2);

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What would the proper initialization and declaration be for an ArrayList myCart meant to store item prices?

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

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

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

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

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

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

[SO, RE, FA, DO]

[SO, RE, MI, FA, DO]

[SO, RE, MI, DO]

[FA, RE, MI, DO]

[FA, SO, RE, MI, DO]

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?