Unit 7 Review (AP Comp Sci A)

Quiz
•
Computers
•
12th Grade
•
Medium
Jennifer Greene
Used 13+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Consider the method.
What is the output when the ArrayList [3, 6, 9, 12, 14] is passed into the method?
[3, 6, 9, 9, 9]
[12. 9, 6, 3]
[3, 6, 9,]
[9, 9 6, 3]
b. [3, 6, 9, 9]
2.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Consider the method. What will output given the ArrayList values and method call below?
[“carrots”, “celery”, “peppers”, “zucchini”, “onion”, “lettuce”]
hasWords(list, "onion", "radish", “peppers”)
0
1
2
3
true
3.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Consider the method. If the following ArrayList were passed to the method, how many elements would the ArrayList store after executing?
[“oops”, “whoops”, “nooope”, “whoooee”, “yoo”, “hoo”]
removeWord(list)
6
5
4
2
0
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Analyze the method
[0, 12, 11, 4, 8]
[0, 11, 4, 8, 12]
[0, 11, 12, 4, 8]
[0, 11, 12, 8, 4]
[0, 11, 12]
5.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the following pieces of code could complete the method such that the method would count the number of Strings that have a length that is greater than 3?
if(words.get(i).length() < 3) count++;
if(words.get(i).length() == 3) count++;
if(words.get(i).length() >= 3) count++;
if(words.get(i).length() > 3) count++;
if(words.get(i).length() % 3 == 0) count++;
6.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Given an ArrayList<Integer> nums populated with values, which loop correctly subtracts two from each value in the list and replaces the original value with the lesser value?
i only
ii only
iii only
i and ii
ii and iii
7.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
The following code is incorrect. The intention of the loop is to find the product of all the values in the ArrayList nums that end in the number zero. You may assume all the values stored in nums are two-digit numbers. Which of the statements below will correct the code?
I only
II only
III only
II and III
I, II, and III
8.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
The ArrayList<Character> letters holds the following data: [g, h, i, j, k, l]. If the actions are taken to modify letters, what will then be stored in the ArrayList?
[g, h, i, n, k, l]
[g, m, n, k, l]
[g, h, i, n, l]
[g, m, i, n, k, l]
[g, h, i, j, k, l]
9.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Consider the method. What is the output given [1, 2, 3, 4, 5] is passed into list?
[2, 4, 3, 5, 3, 6, 14, 46]
[1, 2, 4, 6, 14, 46]
[2, 4, 6, 9, 14, 46]
[1, 2, 3, 4, 5, 6, 9, 14, 23, 46]
[2, 4, 6, 14, 46]
Similar Resources on Wayground
8 questions
Třídící algoritmy

Quiz
•
12th Grade
10 questions
Mr Bulsara

Quiz
•
12th Grade
10 questions
DATA STRUCTURES

Quiz
•
12th Grade
10 questions
AP CS A Unit 7 Quiz PRACTICE

Quiz
•
9th - 12th Grade
10 questions
ArrayLists

Quiz
•
11th - 12th Grade
10 questions
AP CS A Unit 6 Quiz PRACTICE

Quiz
•
9th - 12th Grade
12 questions
Dictionary Class 11

Quiz
•
11th - 12th Grade
10 questions
Quick Sort Quiz

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade