Unit 9 - Inheritance

studied byStudied by 12 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

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
robot