APCSA Unit 7

APCSA Unit 7

9th - 12th Grade

12 Qs

quiz-placeholder

Similar activities

APCSA Search & Sort

APCSA Search & Sort

9th - 12th Grade

15 Qs

Topic 3 & 4 Practice - ArrayList and String Methods

Topic 3 & 4 Practice - ArrayList and String Methods

12th Grade

15 Qs

Quick Sort Quiz

Quick Sort Quiz

12th Grade

10 Qs

ArrayList

ArrayList

10th - 12th Grade

11 Qs

AP CS ArrayLists

AP CS ArrayLists

12th Grade

17 Qs

Unit 8 - Searching and Sorting

Unit 8 - Searching and Sorting

9th - 12th Grade

15 Qs

Java ArrayLists

Java ArrayLists

10th Grade

11 Qs

Advanced Java Study Guide

Advanced Java Study Guide

11th - 12th Grade

10 Qs

APCSA Unit 7

APCSA Unit 7

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Justin Loomis

Used 2+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these declarations will cause an error?

ArrayList<int> list = new ArrayList<>();

ArrayList<Integer> list = new ArrayList<>();

ArrayList<Object> list = new ArrayList<>();

ArrayList<Boolean> list = new ArrayList<>();

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is printed when the code segment executes?

2

13

15

20

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

This method is intended to remove all values in list which are equal to n. Which of these describes the functionality of the method.

The method does not function as intended because it skips elements while looping.

The method does not function as intended because it should use == instead of .equals

The method does not function as intended because elements cannot be removed from an ArrayList

The method functions as intended.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What are the contents of myList after the code segment executes?

["dairy","hay","pesticide"]

["dairy","hay","ranch"]

["poultry","pesticide","ranch"]

["ranch","poultry","pesticide"]

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is printed when the code segment executes?

[1,4,7]

[6,4]

[4,9]

[4,7,9]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of these best describes the list of values returned by this mystery method?

the absolute values of the values in the given array

the frequencies of the values in the given array

the cumulative sums of the values in the given array

the indices of the values int he given array

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What algorithm is implemented by this mystery method?

binary search

linear search

insertion sort

selection sort

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?