Inheritance

studied byStudied by 109 people
2.5(2)
get a hint
hint

inheritance

1 / 10

Studying Progress

0%
New cards
11
Still learning
0
Almost done
0
Mastered
0
11 Terms
1
New cards

inheritance

a way to create relationships between classes

New cards
2
New cards

inheritance hierarchy

designed to quantify the relationship between these classes. It defines the parent class and all of it’s children classes

New cards
3
New cards

superclass

the parent class, it holds the most basic form of objects found in the overall program

New cards
4
New cards

subclass

the objects in this “child class” will be more specific compared to those found in the superclass, or parent class

New cards
5
New cards

multiple inheritance

A class MAY NOT have more than 1 direct superclass!! This is against the rules in Java!!

New cards
6
New cards

overidden

a child class can have the same method class as the parent class. Methods are resolved based on the class that the object was created in. The method will be called instead of the inherited parent method. child overrides the parent method

New cards
7
New cards

overloaded

2 methods with the same name but with different lists of parameters, they can differ in number or type

New cards
8
New cards

super keyword

keyword used to call a method in a class, useful when child class overrides and inherited method, yet it still wants to call it

New cards
9
New cards

extends

keyword used to specify the parent class to inherit from, that is followed by the name of the parent class, if extends isn’t mentioned, it will just inherit from the object class

New cards
10
New cards

static

a keyword used to indicate that an instance variable or a method is a part of the class and not an object that is created by the class

New cards
11
New cards

polymorphism

The runtime type of an object can be that type or any subclass of the declared type. All method calls are resolved starting with the class that created the object. If the method isn’t found in the class that created the object, then it will look to the parent class until it finds the method. The method must exist, or the code won’t compile

New cards

Explore top notes

note Note
studied byStudied by 18 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 47 people
Updated ... ago
5.0 Stars(3)
note Note
studied byStudied by 10 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 50 people
Updated ... ago
4.0 Stars(1)
note Note
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 19178 people
Updated ... ago
4.9 Stars(242)

Explore top flashcards

flashcards Flashcard47 terms
studied byStudied by 11 people
Updated ... ago
5.0 Stars(4)
flashcards Flashcard72 terms
studied byStudied by 109 people
Updated ... ago
5.0 Stars(4)
flashcards Flashcard58 terms
studied byStudied by 21 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard106 terms
studied byStudied by 50 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard79 terms
studied byStudied by 51 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard35 terms
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard59 terms
studied byStudied by 10 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard47 terms
studied byStudied by 1142 people
Updated ... ago
4.5 Stars(39)