CSCI-C201 Quiz 3

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

A(n) __________ method is a method that appears in a superclass but expects to be overridden in a subclass.

abstract

When an "is a" relationship exists between objects, the specialized object has __________.

all of the characteristics of the general object plus additional characteristics

In the following code, which line has an error? public interface Interface1 { int FIELDA = 55; public int methodA(double){} }

line 4

In Java, a reference variable is __________ because it can reference objects of types different from its own, as long as those types are related to its type through inheritance.

polymorphic

The __________ key word is used to call a superclass constructor explicitly.

super

If a class contains an abstract method __________.

the method will only have a header, but not a body, and will end with a semicolon

In an inheritance relationship __________.

the superclass constructor always executes before the subclass constructor

__________ tells the Java compiler that a method is meant to override a method in the superclass.

@Override

Which of the following is true about protected access?

Protected members may be accessed by methods in the same package or in a subclass, even when the subclass is in a different package.


Kaugnay na mga set ng pag-aaral

Psych - AP classroom questions - 5 senses Test - 11/29/23

View Set

Sociology The Real World chapter 15

View Set

Animal Phys-Outlaw-Test 1-Chapter 4

View Set

Chapter 10 Clicker Questions: The Endocrine System

View Set

Chapter 10: Performance Measurement in Decentralized Organizations

View Set

Global Dimensions of Business Midterm

View Set

Completing the Application, Underwriting, and Delivering the Policy

View Set

Types of Life Insurance Policies Practice Quiz

View Set

Financial Management, Mid-term review, Chapter 5

View Set

ONRT 3 Abolition and Antebellum Slavery Part 2

View Set

A&P 1, Chapter 1 - Lesson Objectives & Test Yourself Q&A's

View Set