What is the proper way to get the number of items in an ArrayList called list?
CSA Unit 7 Test

Quiz
•
Computers
•
9th Grade
•
Medium
Kevin Kamrath
Used 4+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
list.length
list.size
list.length()
list.size()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code print?
Hello
World
list[0]
There will be a compiler error
None of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is wrong with the following code?
It will throw an IndexOutOfBoundsException.
You cannot use int as the type in an ArrayList.
list is a reserved word, so you can’t call the variable that.
You need to define the new ArrayList on a new line of code.
Nothing. The above code is correct.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code print?
0
5
6
9
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code print?
3
coding
in
Java
6.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Consider the following statement:
I
II
III
None
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What would the proper initialization and declaration be for an ArrayList myTemps meant to store precise temperature measurements?
ArrayList<double> myTemps = new ArrayList<double>();
ArrayList<Double> myTemps = new ArrayList<Double>();
ArrayList<Integer> myTemps = new ArrayList<Integer>();
ArrayList<double> myTemps = ArrayList<double>();
ArrayList<Double> myTemps = ArrayList<Double>();
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
2D Arrays

Quiz
•
9th - 12th Grade
20 questions
Arrays in Java

Quiz
•
9th - 12th Grade
20 questions
GCSE Computer Science: Programming (Data Structures)

Quiz
•
9th - 10th Grade
19 questions
Unit 5 - Two-Dimensional Arrays

Quiz
•
9th - 12th Grade
21 questions
CSS Basics

Quiz
•
6th - 12th Grade
16 questions
Loops

Quiz
•
5th - 12th Grade
20 questions
Java Arrays

Quiz
•
9th - 12th Grade
20 questions
Unit 6 ArrayLists and String Methods

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University