Practice for AP Java Flashcard #7

Practice for AP Java Flashcard #7

Assessment

Flashcard

Computers

10th - 12th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

15 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What is the output of this program? Options: 0, 2, 5, 7

Media Image

Back

7

2.

FLASHCARD QUESTION

Front

How many total members (including inherited members) does the Child class have?

Media Image

Back

3

3.

FLASHCARD QUESTION

Front

Which of the following statements would cause an error?
Options: Parent a = new Parent();, Parent b = new Parent(5);, Parent c = new Parent(2,3);, Child d = new Child(2);

Media Image

Back

Child d = new Child(2);

4.

FLASHCARD QUESTION

Front

The best replacement for ?? in keyPressed is

Media Image

Back

bob.turn(-10);

5.

FLASHCARD QUESTION

Front

Which line of code is NOT using encapsulation correctly? Options: line 3, line 4, line 5, lines 3,4 and 5 all use encapsulation

Media Image

Back

line 5

6.

FLASHCARD QUESTION

Front

What range best matches the expression (int)Math.random()*5 ?

Back

{0}

7.

FLASHCARD QUESTION

Front

What is the most important advantage of an ArrayList over an Array?

Back

ArrayLists can change in size, Arrays are fixed in size

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?