Chapter 10 Inheritance

Your page rank:

Total word count: 683
Pages: 2

Calculate the Price

- -
275 words
Looking for Expert Opinion?
Let us have a look at your work and suggest how to improve it!
Get a Consultant

In an inheritance relationship, this is the general class.


In an inheritance relationship, this is the specialized class.


This key word indicates that a class inherits from another class.


A subclass does not have access to these superclass members.


This key word refers to an object’s superclass.


In a subclass constructor, a call to the superclass constructor must __________ .

appear as the very first statement

The following is an explicit call to the superclass’s default constructor.


A method in a subclass that has the same signature as a method in the superclass is an example of __________ .


A method in a subclass having the same name as a method in the superclass but a dif-ferent signature is an example of __________ .


These superclass members are accessible to subclasses and classes in the same pack-age.


All classes directly or indirectly inherit from this class.


With this type of binding, the Java Virtual Machine determines at runtime which method to call, depending on the type of the object that a variable references.


This operator can be used to determine whether a reference variable references an object of a particular class.


When a class implements an interface, it must __________ .

provide all of the methods that are listed in the interface, with the exact signatures and return types specified

Fields in an interface are __________ .

both final and static

Abstract methods must be __________ .


Abstract classes cannot __________ .

be instantiated

Constructors are not inherited.


In a subclass, a call to the superclass constructor can only be written in the subclass constructor.


If a subclass constructor does not explicitly call a superclass constructor, Java will not call any of the superclass’s constructors.


An object of a superclass can access members declared in a subclass.


The superclass constructor always executes before the subclass constructor.


When a method is declared with the final modifier, it must be overridden in a subclass.


A superclass has a member with package access. A class that is outside the superclass’s package but inherits from the superclass can access the member.


A superclass reference variable can reference an object of a subclass that extends the superclass.


A subclass reference variable can reference an object of the superclass.


When a class contains an abstract method, the class cannot be instantiated.


A class may only implement one interface.


By default all members of an interface are public.


This is a method that is automatically called when an instance of a class is created.


Making an instance of one class a field in another class is called ___________.


What is an "is-a" relationship?

is a relationship not a has a relationship

A program uses two classes: Animal and Dog. Which class is the superclass and which is the subclass?

Animal Super, Dog subclass

What is the superclass and what is the subclass in the following line? public class Pet extends Dog

pet is subclass, dog is superclass

What is the difference between a protected class member and a private class member?

protected in same package and kids. private only parent.

Can a subclass ever directly access the private members of its superclass?


Which constructor is called first, that of the subclass or the superclass?


What is the difference between overriding a superclass method and overloading a superclass method?

parameters. rewrite.

Reference variables can be polymorphic. What does this mean?

morph into a reference of object or interface.

When does dynamic binding take place?

Run time

What is an abstract method?

Makes sure method is implementing by override.

What is an abstract class?

generic and other classes inherit from it.

What are the differences between an abstract class and an interface?

interface specifies behavior and abstract class is generic.

When you instantiate an anonymous inner class, the class must do one of two things. What are they?

implement an interface or extend superclass

What is a functional interface?

interface that has one abstract method.

What is a lambda expression?

creates object that implements functional interface.

Share This

More flashcards like this

NCLEX 10000 Integumentary Disorders

When assessing a client with partial-thickness burns over 60% of the body, which finding should the nurse report immediately? a) ...

Read more


A client with amyotrophic lateral sclerosis (ALS) tells the nurse, "Sometimes I feel so frustrated. I can’t do anything without ...

Read more

NASM Flashcards

Which of the following is the process of getting oxygen from the environment to the tissues of the body? Diffusion ...

Read more

Unfinished tasks keep piling up?

Let us complete them for you. Quickly and professionally.

Check Price

Successful message