AP CS A Unit 7 Quiz PRACTICE

AP CS A Unit 7 Quiz PRACTICE

9th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Cyber Security Homework 1

Cyber Security Homework 1

7th - 9th Grade

15 Qs

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

Паскаль. Основные команды

Паскаль. Основные команды

8th - 11th Grade

10 Qs

Bài tập Tin học 11 (Tiết 6)

Bài tập Tin học 11 (Tiết 6)

11th Grade

13 Qs

ICT as Social Change

ICT as Social Change

12th Grade

10 Qs

C# lesson10

C# lesson10

1st - 10th Grade

10 Qs

Konsep Routing

Konsep Routing

1st - 10th Grade

10 Qs

حاسب 2

حاسب 2

10th Grade

15 Qs

AP CS A Unit 7 Quiz PRACTICE

AP CS A Unit 7 Quiz PRACTICE

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

Scott Chamberlain

Used 6+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

3 mins • 3 pts

When instantiating a new ArrayList, which data types can we use? Select all that apply:

int

Integer

String

Double

double

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Consider the following code segment.

What is printed as a result of running this code segment?

[1, 2, 3, 4]

[2, 0, 3, 4]

[2, 3, 4]

[1, 3, 4]

[1, 0, 3, 4]

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Suppose the following line is used to replace /* Missing Code */.

System.out.println(list.get(0));

What is printed as a result of executing the code segment?

hotdog costs $2.0

soda costs $0.0

water costs $1.0

none costs $0.0

hotdog costs $2

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Suppose the following line is used to replace /* Missing Code */. System.out.println(list.get(list.size()-1)); What is printed as a result of executing the code segment?

water costs $1.0

water costs $1

hamburger costs $3.5

none costs $0.0

There is an error that occurs because we are trying to access an index out of range

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Suppose the following lines are used to replace /* Missing Code */. list.remove(1);

System.out.println(list.get(1)); What is printed as a result of executing the code segment?

soda costs $-3.0

soda costs $0.0

hotdog costs $2

hotdog costs $2.0

water costs $1.0

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

After running the code, what is the size of bulbs?

2

3

4

5

6

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Consider the following method that is intended to test if all the Strings in the ArrayList start with a lowercase letter.

Which of the following could replace /* Missing Code */ so that the method works as intended? (You may assume all strings in the ArrayList begin with a letter character.)

I only

II only

III only

II and III

I, II, and III

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?