Chapter 6 - Encapsulation Flashcards

1
Q

Write down main concepts which helps to implement encapsualtion

A

Access Modifiers

Getters, setters

Constructor

Final Keyword

Inner classes

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

What is Encapsulation

A

Encapsulation is one of the fundamental principles of object-oriented programming (OOP) and is used to protect the internal state of an object by restricting access to its fields (data) and providing controlled access through methods.

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