
Java 1D ArrayLists Quiz
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
Tony Banning
Used 2+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare an ArrayList in Java?
`ArrayList al = new ArrayList();`
`ArrayList[] al = new ArrayList();`
`ArrayList<> al = new ArrayList<>();`
`List al = new ArrayList();`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to initialize an ArrayList of Strings?
`ArrayList
`ArrayList list = new ArrayList
`List
All of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you add an element to an ArrayList?
`list.addElement("Hello");`
`list.add("Hello");`
`list.insert("Hello");`
`list.put("Hello");`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the element at index 2 in an ArrayList `list`?
`list[2];`
`list.get(2);`
`list.elementAt(2);`
`list.indexOf(2);`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to modify the element at index 3 in an ArrayList `list`?
`list.set(3, "New Element");`
`list.add(3, "New Element");`
`list.replace(3, "New Element");`
`list.update(3, "New Element");`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you remove the element at index 4 in an ArrayList `list`?
`list.remove(4);`
`list.delete(4);`
`list.erase(4);`
`list.cut(4);`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a built-in method of ArrayList?
`clear()`
`length()`
`size()`
`isEmpty()`
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
11 questions
Unit 2, 1.3 Types of information access and storage devices
Quiz
•
12th Grade
13 questions
ICT and Retail Industry
Quiz
•
8th - 12th Grade
20 questions
2.3.1 Graph Traversal & Path Finding Algorithms
Quiz
•
12th Grade - University
20 questions
Design your website
Quiz
•
7th - 12th Grade
16 questions
OCR Sys Arch J277
Quiz
•
10th - 12th Grade
14 questions
ITGS - IT Systems (Hardware)
Quiz
•
10th - 12th Grade
13 questions
INTERNET CONNECTION
Quiz
•
12th Grade
11 questions
Email of request
Quiz
•
12th Grade - Professi...
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
Discover more resources for Computers
15 questions
Internet Vocabulary Notebook Check #2 - CTEA(2024)
Quiz
•
12th Grade
11 questions
Internet Terms Vocabulary- Notebook Check #1- CTEA
Quiz
•
12th Grade
50 questions
Money Matters Fall 2025 Final Exam — Worksheet Questions
Quiz
•
12th Grade
47 questions
CSF Final Exam Practice
Quiz
•
9th - 12th Grade
