Unit 7 - ArrayList - Test Review

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Jadzia Hutchings
Used 12+ times
FREE Resource
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
[SO, RE, FA, DO]
[SO, RE, MI, FA, DO]
[SO, RE, MI, DO]
[FA, RE, MI, DO]
[FA, SO, RE, MI, DO]
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
List Review Quiz

Quiz
•
9th - 12th Grade
12 questions
Матрицы и генераторы списков

Quiz
•
10th Grade
10 questions
T3_PC6.1 & PC6.2

Quiz
•
9th Grade
15 questions
APCS Lesson 7.0-7.2 Review

Quiz
•
9th - 12th Grade
15 questions
Basic Data Structures - Intro to CS

Quiz
•
12th Grade
15 questions
Area With Arrays

Quiz
•
10th - 12th Grade
15 questions
PCEP Section 3B: list methods: append(), insert(), index()

Quiz
•
12th Grade
11 questions
Javascript Lists Lecture Knowledge Check

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
Discover more resources for Computers
50 questions
Trivia 7/25

Quiz
•
12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
6 questions
RL.10.1 Cite Evidence

Quiz
•
10th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
14 questions
Algebra 1 SOL Review #1

Quiz
•
9th Grade