
CPT 236 Test 3 Review

Quiz
•
Computers
•
University
•
Medium
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
Similar Resources on Wayground
43 questions
Latihan Session Codeigniter 4

Quiz
•
University
50 questions
Python Basic

Quiz
•
University
40 questions
SOAL ASTS KONS. KEAHLIAN - PBO 11 RPL TAHUN AJARAN 2024/2025

Quiz
•
11th Grade - University
40 questions
A4ALGU CLUB EVENT QUIZ

Quiz
•
University
40 questions
DPA Quiz

Quiz
•
University
48 questions
Python Programming

Quiz
•
University
47 questions
Corel Draw

Quiz
•
University
50 questions
Quiz PSBO (2024-01)

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade