Unit 9 - Inheritance

studied byStudied by 12 people
0.0(0)
Get a hint
Hint

Inheritance

1 / 10

flashcard set

Earn XP

Description and Tags

11 Terms

1

Inheritance

When a subclass shares methods and variables with a superclass

New cards
2

Diamond problem

A special rule in inheritance where a subclass can only inherit from one superclass

New cards
3

Class hierarchy

A structure created using inheritance, where one superclass can have multiple subclasses

New cards
4

Constructors

Methods used to initialize objects, not inherited from superclasses

New cards
5

Super keyword

A keyword used to call the constructor of the superclass with the parameters of the subclass

New cards
6

Method signature

The combination of a method's name and its parameters

New cards
7

Overriding methods

When a public method in the subclass has the same method signature as a public method in the superclass

New cards
8

@Override

An annotation used to indicate that a method overrides a method from a superclass

New cards
9

Inheritance hierarchies

A structure where changes in the top superclass affect all the subclasses beneath it

New cards
10

Polymorphism

The ability to assign an object in a subclass to a reference of the superclass

New cards
11

Object class

The superclass of all classes, part of java.lang, often modified or overwritten in subclasses

New cards

Explore top notes

note Note
studied byStudied by 23 people
... ago
5.0(1)
note Note
studied byStudied by 73 people
... ago
5.0(2)
note Note
studied byStudied by 7454 people
... ago
4.6(5)
note Note
studied byStudied by 9 people
... ago
5.0(1)
note Note
studied byStudied by 20 people
... ago
5.0(1)
note Note
studied byStudied by 20 people
... ago
5.0(1)
note Note
studied byStudied by 9 people
... ago
5.0(1)
note Note
studied byStudied by 125764 people
... ago
4.8(564)

Explore top flashcards

flashcards Flashcard (28)
studied byStudied by 8 people
... ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (56)
studied byStudied by 11 people
... ago
5.0(1)
flashcards Flashcard (47)
studied byStudied by 23 people
... ago
5.0(2)
flashcards Flashcard (58)
studied byStudied by 17 people
... ago
5.0(1)
flashcards Flashcard (246)
studied byStudied by 3 people
... ago
5.0(1)
flashcards Flashcard (38)
studied byStudied by 3 people
... ago
5.0(1)
flashcards Flashcard (84)
studied byStudied by 34 people
... ago
5.0(2)
robot