Unit 9 - Inheritance

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/10

flashcard set

Earn XP

Description and Tags

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

11 Terms

1
New cards

Inheritance

When a subclass shares methods and variables with a superclass

2
New cards

Diamond problem

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

3
New cards

Class hierarchy

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

4
New cards

Constructors

Methods used to initialize objects, not inherited from superclasses

5
New cards

Super keyword

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

6
New cards

Method signature

The combination of a method's name and its parameters

7
New cards

Overriding methods

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

8
New cards

@Override

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

9
New cards

Inheritance hierarchies

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

10
New cards

Polymorphism

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

11
New cards

Object class

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