
ArrayLists
Quiz
•
Computers
•
University
•
Medium
Maddie Mihevc
Used 16+ times
FREE Resource
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If we have an ArrayList instruction with the element “Stop” at index 5, how do we change the string at 5 to “Go”?
list.add(5, "Go")
list.add(4, "Go")
list.set(5, "Go")
list.set(4, "Go")
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You can use the set method to place an element in a list at any index you want
true
false
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You can use the add method to place an element in a list at any index you want
true
false
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If aList is an object of the class ArrayList<String> that contains four strings “red”, “blue”, “green”, and “yellow”, what is the order of the strings on the list after aList.add(2, “orange”); ?
{“red”, “blue”, “orange”, “green”, “yellow”}
{“red”, “orange”, “blue”, “green”, “yellow”}
{“red”, “blue”, “green”, “orange”, “yellow”}
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you create a list using
ArrayList<Double> doubleList = new ArrayList<Double>(20);
can the list contain more than 20 elements?
Yes because capacity isn't fixed
No because capacity is fixed
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you decrease the current capacity to the current size?
trimToSize()
clear()
trim()
decreaseCapacity()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between ArrayList size and capacity?
size is the number elements in the list while capacity is the maximum number of elements it can hold without resizing
capacity is the number elements in the list while size is the maximum number of elements it can hold without resizing
both represent the number of elements in the list
both represent the number of elements the list can hold before resizing
Similar Resources on Wayground
9 questions
C++ linked lists
Quiz
•
University
9 questions
Data Structures and Algorithm
Quiz
•
University
10 questions
Computer
Quiz
•
University
10 questions
TIU Quiz-9
Quiz
•
University
7 questions
Tags in Html
Quiz
•
University
10 questions
QUIZ on html
Quiz
•
University
10 questions
Digital Electronics - Memory Devices
Quiz
•
University
10 questions
Html/Css Quiz Day 1
Quiz
•
University
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz
Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH
Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms
Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines
Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
11 questions
All about me
Quiz
•
Professional Development
15 questions
Subtracting Integers
Quiz
•
7th Grade
Discover more resources for Computers
15 questions
Let's Take a Poll...
Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly
Quiz
•
University
34 questions
WH - Unit 2 Exam Review -B
Quiz
•
10th Grade - University
21 questions
Mapa países hispanohablantes
Quiz
•
1st Grade - University
10 questions
Transition Words
Quiz
•
University
5 questions
Theme
Interactive video
•
4th Grade - University
25 questions
Identifying Parts of Speech
Quiz
•
8th Grade - University
10 questions
Spanish Greetings and Goodbyes!
Lesson
•
6th Grade - University
