
ArrayList Practice
Flashcard
•
Computers
•
9th - 12th Grade
•
Hard
Wayground Content
FREE Resource
Student preview

15 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What index value is used to locate the last element in the nums ArrayList?
Back
nums.size()-1
2.
FLASHCARD QUESTION
Front
Which statement below is the correct way to retrieve the first element in the nums ArrayList? Options: nums.get(0), nums[0], nums(0), nums[1]
Back
nums.get(0)
3.
FLASHCARD QUESTION
Front
Given the ArrayList nums with the values [3, 7, 6, 0], what code below is the proper way to change the 7 to be a 5? Options: nums.set(1, 5), nums.set(7, 5), nums.set(5, 2), nums[2] = 5
Back
nums.set(1, 5)
4.
FLASHCARD QUESTION
Front
Which statement is the correct declaration and initialization of an ArrayList of String values? Options: ArrayList<String> name; name = new ArrayList<String>();, ArrayList name; name = new ArrayList<String>();, ArrayList<String> name; name = ArrayList<String>();, String<ArrayList> name; name = new String<ArrayList>();
Back
ArrayList<String> name;
name = new ArrayList<String>();
5.
FLASHCARD QUESTION
Front
What is the ArrayList nums if it is initially [5, 3, 1] and the following code is executed?
nums.add(6);
nums.add(0, 4);
nums.remove(1);
Back
[4, 3, 1, 6]
6.
FLASHCARD QUESTION
Front
What index value is used to locate the last element in the nums ArrayList?
Back
nums.size()-1
7.
FLASHCARD QUESTION
Front
What is the ArrayList nums if it is initially [5, 3, 1] and the following code is executed?
nums.add(6);
nums.add(0, 4);
nums.remove(1);
Back
[4, 3, 1, 6]
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
Jehlan objem
Flashcard
•
11th Grade
12 questions
Чоловік чи жінка
Flashcard
•
10th Grade
9 questions
SE LIGA - Conjunto dos Nºs Reais
Flashcard
•
11th Grade
10 questions
Temiz Çevre: Geleceğimiz İçin Bir Sorumluluk
Flashcard
•
KG
10 questions
Angka Arab 1 sampai 10
Flashcard
•
KG
15 questions
Operasi tambah lingkungan 10
Flashcard
•
KG
15 questions
Function Flashcard
Flashcard
•
8th - 12th Grade
15 questions
F732 Flashcard
Flashcard
•
KG - University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
Discover more resources for Computers
18 questions
Artificial Intelligence and Machine Learning Quiz
Quiz
•
9th Grade
35 questions
Computer Terminology Exercise #1 ( Multiple Choice)
Quiz
•
9th Grade
20 questions
Computer Components Exercise #4 - CTEA
Quiz
•
9th - 12th Grade
30 questions
Computer Terminology Exercise #1 ( Fill Ins)
Quiz
•
9th Grade