
PGAS - Arrays & ArrayLists

Flashcard
•
Computers
•
1st Grade
•
Hard
Wayground Content
FREE Resource
Student preview

21 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Which is correct syntax to access an element of an ArrayList in Java? Options: list.get(index), list[index], list.getElement(index), list.index
Back
list.get(index)
2.
FLASHCARD QUESTION
Front
What does it mean for a list to be "dynamic"?
Back
You can easily add and remove elements.
3.
FLASHCARD QUESTION
Front
How do you get the number of elements in an ArrayList called "list" in Java?
Back
list.size();
4.
FLASHCARD QUESTION
Front
The _________ method will return the total elements in an ArrayList.
Back
size()
5.
FLASHCARD QUESTION
Front
What are the legal indexes for the array ar
, given the following declaration:
int[] ar = {2, 4, 6, 8 }?
Back
0, 1, 2, 3
6.
FLASHCARD QUESTION
Front
The ArrayList nums is initialized with the values [5, 3, 1]. What is displayed when the following code is executed?
nums.add(6);
nums.add(0, 4);
nums.remove(1);
Back
[4, 3, 1, 6]
7.
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)
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Arrays

Flashcard
•
2nd Grade
15 questions
Array

Flashcard
•
2nd Grade
15 questions
Arrays(Repeated Addition) Test (Friday 13 Dec.24)

Flashcard
•
2nd Grade
15 questions
Arrays

Flashcard
•
2nd Grade
15 questions
Arrays

Flashcard
•
2nd Grade
15 questions
How to Fly a Kite

Flashcard
•
1st Grade
15 questions
Arrays

Flashcard
•
2nd Grade
16 questions
Division Arrays

Flashcard
•
1st Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
18 questions
D189 1st Grade OG 1c Concept 37-38

Quiz
•
1st Grade
20 questions
addition

Quiz
•
1st - 3rd Grade
20 questions
Subject and predicate in sentences

Quiz
•
1st - 3rd Grade
20 questions
Addition and Subtraction facts

Quiz
•
1st - 3rd Grade
20 questions
Place Value

Quiz
•
KG - 3rd Grade
10 questions
Exploring Properties of Matter

Interactive video
•
1st - 5th Grade
5 questions
Life at a pond

Quiz
•
1st Grade
14 questions
Plural Nouns Adding s and es

Quiz
•
1st - 2nd Grade