Module 11 Flashcards

(11 cards)

1
Q

A concept in object-oriented programming that allows objects of different classes to be used interchangeably, while still maintaining their own unique behavior.

A

Polymorphism

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Means “many”

A

Poly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Means “Take different forms”

A

Morph

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Also known as compile-time polymorphism, refers to the ability of the compiler to determine which method to call at compile time based on the arguments passed to the method.

Achieved through method overloading, where multiple methods in the same class have the same name but different parameters.

A

Static polymorphism

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Also known as runtime polymorphism, refers to the ability of objects to respond to the same message with the appropriate method based on their class definition at runtime.

Achieved through method overriding, where a subclass provides a different implementation of a method that is already defined in its superclass.

A

Dynamic polymorphism

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Allows to use many methods with the same name but differing signatures and return types.

A

Compile Time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Associated with different classes, but it allows to use the same method with different signature names.

A

Runtime

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The process of associating a method or function call with its implementation at runtime.

A

Binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

There are two types of binding in Java:

A

Static binding and Dynamic binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Occurs when the method to be called is determined at compile time.

This binding is also known as early binding because it takes place before the program actually runs.

A

Static Binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Also known as late binding or runtime binding, occurs when the method to be called is determined at runtime.

Dynamic binding is also called late binding or runtime binding because binding occurs during runtime.

A

Dynamic Binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly