CPT 236 Test 3 Review

CPT 236 Test 3 Review

University

45 Qs

quiz-placeholder

Similar activities

Exception in Java

Exception in Java

University

41 Qs

MIDTERM ITC-103

MIDTERM ITC-103

University

50 Qs

Quiz Review Pra UAS

Quiz Review Pra UAS

University

50 Qs

UTS Pemrograman Game Dasar

UTS Pemrograman Game Dasar

University

50 Qs

Latihan 1 PBO XI RPL 2

Latihan 1 PBO XI RPL 2

10th Grade - University

40 Qs

PAS Informatika Kelas 8, 2025 Semester Genap

PAS Informatika Kelas 8, 2025 Semester Genap

7th Grade - University

50 Qs

2025 CLASS 6 COMPUTER REVISION SESSION

2025 CLASS 6 COMPUTER REVISION SESSION

6th Grade - University

40 Qs

ooad

ooad

University

45 Qs

CPT 236 Test 3 Review

CPT 236 Test 3 Review

Assessment

Quiz

Computers

University

Medium

Created by

Reza Naqvi

Used 6+ times

FREE Resource

45 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What modifier should you use on a class so that a class in the same package can access it but a class (including a subclass) in a different package cannot access it?

public

private

protected

Use the default modifier

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Polymorphism means ______________.

that data fields should be declared private

that a class can extend another class

that a variable of supertype can refer to a subtype object

that a class can contain another class

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Inheritance means ______________.

that data fields should be declared private

that a class can extend another class

that a variable of supertype can refer to a subtype object

that a class can contain another class

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Encapsulation means ______________.

that data fields should be declared private

that a class can extend another class

that a variable of supertype can refer to a subtype object

that a class can contain another class

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

You can create an ArrayList using _________.

new ArrayList[]

new ArrayList[100]

new ArrayList<>()

ArrayList()

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What modifier should you use on the members of a class so that they are not accessible to another class in a different package, but are accessible to any subclasses in any package?

public

private

protected

Use the default modifier.

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Suppose an ArrayList list contains {"red", "green", "red", "green"}. What is the list after the following code?

list.remove("red");

{"red", "green", "red", "green"}

{"green", "red", "green"}

{"green", "green"}

{"red", "green", "green"}

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?