JAVA 2 - IMPORTANT Flashcards

1
Q

What are the four fundamental OOP concepts?

A

Encapsulation, Inheritance, Polymorphism, and abstraction.

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

What is Encapsulation?

A

Encapsulation in Java is a mechanism of wrapping the data (variables) and code acting on the data (methods) together as a single unit. In encapsulation, the variables of a class will be hidden from other classes, and can be accessed only through the methods of their current class. Therefore, it is also known as data hiding.

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