Inheritance

studied byStudied by 123 people
0.0(0)
get a hint
hint

Inheritance

1 / 11

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

12 Terms

1

Inheritance

A way to create a relationship amongst classes.

New cards
2

Inheritance Hierarchy

A way to determine how information travels amongst the classes.

New cards
3

Superclass

The parent class from which other classes inherit.

New cards
4

Subclass

The classes that inherit from the superclass. They are more specific compared to the parent class.

New cards
5

Overridden method

When one version of a method is replaced by another version.

New cards
6

Polymorphism

When many classes are related to each other by inheritance, allowing different tasks to be performed using inherited methods.

New cards
7

Can a subclasses inherit public instance variables from its superclass?

Yes

New cards
8

Can a subclasses inherit private instance variables from its superclass?

No

New cards
9

Can a subclasses inherit public methods from its superclass?

Yes

New cards
10

Can a subclasses inherit private methods from its superclass?

No

New cards
11

What keyword do you use in the class header to specify the superclass for the subclass you are creating?

extends

// for example:
public class Subclass extends Superclass{}
New cards
12

What does super() mean in the constructor of a subclass?

It calls the constructor of the superclass.

New cards

Explore top notes

note Note
studied byStudied by 12 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 236 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 12 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 20 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 15 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 36 people
Updated ... ago
5.0 Stars(1)

Explore top flashcards

flashcards Flashcard57 terms
studied byStudied by 69 people
Updated ... ago
4.8 Stars(4)
flashcards Flashcard279 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard40 terms
studied byStudied by 10 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard37 terms
studied byStudied by 173 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard40 terms
studied byStudied by 15 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard113 terms
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard61 terms
studied byStudied by 131 people
Updated ... ago
5.0 Stars(3)
flashcards Flashcard77 terms
studied byStudied by 19 people
Updated ... ago
4.0 Stars(1)