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
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.