#084 ArrayLists
Interactive Video
•
Computers
•
9th Grade
•
Practice Problem
•
Easy
Myra Deister
Used 7+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the first difference that is expressed in the video between an Array and an ArrayList?
ArrayLists require importing a specific class before use
Regular arrays don't need to specify a data type
ArrayLists must have a fixed size when created
Regular arrays can only hold primitive data types
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When creating a new ArrayList, what is true about its initial size?
It starts with size 10 by default
It starts with size 0 and grows as needed
You must specify the initial size
It has the same size as the last ArrayList created
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens to existing elements when you use add(1, "tuna") on an ArrayList?
The existing element at index 1 is replaced
All existing elements are deleted
Elements from index 1 onward shift right by one position
The new element is added only if index 1 is empty
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do the two versions of the add() method differ in functionality?
One adds integers, the other adds strings
One adds single elements, the other adds multiple elements
One returns true, the other returns false
One adds at the end, the other adds at a specified index
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the key difference between set() and add() methods?
set() can only modify existing indexes while add() can expand the list
set() works with strings only
add() can only append to the end
There is no difference
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens when you remove() an element from an ArrayList?
The space is left empty
A null value replaces the removed element
Subsequent elements shift left to fill the gap
The ArrayList size stays the same
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement about ArrayList limitations is correct?
ArrayLists can hold both primitive and object types directly
ArrayLists can only hold primitive types
ArrayLists can only hold object types
ArrayLists can only hold strings
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does modern Java handle primitive-to-wrapper conversion?
It must always be done manually
It uses autoboxing to handle conversion automatically
It's not possible to convert primitives
It requires external libraries
9.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the number of elements in an ArrayList versus an array?
Both use .length()
ArrayList uses .size() and array uses .length
Both use .size()
ArrayList uses .length and array uses .size()
Similar Resources on Wayground
Popular Resources on Wayground
10 questions
Forest Self-Management
Lesson
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
30 questions
Thanksgiving Trivia
Quiz
•
6th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
48 questions
The Eagle Way
Quiz
•
6th Grade
10 questions
Identifying equations
Quiz
•
KG - University
10 questions
Thanksgiving
Lesson
•
5th - 7th Grade
Discover more resources for Computers
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University
18 questions
Thanksgiving Trivia
Quiz
•
4th - 12th Grade
20 questions
Thanksgiving
Quiz
•
KG - 12th Grade
20 questions
Pythagorean Theorem and Their Converse
Quiz
•
8th - 9th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
10 questions
Thanksgiving Trivia Challenge: Test Your Knowledge!
Interactive video
•
6th - 10th Grade