Java 4 Pillars Flashcards

1
Q

Abstraction

A

It is a process of hiding implementation details and exposing only the functionality to the user. In abstraction, we deal with ideas and not events. This means the user will only know “what it does” rather than “how it does”.

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

Polymorphism

A

It is the ability to perform many things in many ways. The word Polymorphism is from two different Greek words- poly and morphs. “Poly” means many, and “Morphs” means forms. So polymorphism means many forms. The polymorphism can be present in the case of inheritance also. The functions behave differently based on the actual implementation.

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

Inheritance

A

It is the process of one class inheriting properties and methods from another class in Java. Inheritance is used when we have is-a relationship between objects. Inheritance in Java is implemented using extends keyword.

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

Encapsulation

A

It is the process of wrapping code and data together into a single unit.

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