Which concept is used to implement the information hiding?
Answers
Answer:
Access Specifier
Explanation:
Encapsulation is the feature but Access Specifier is the concept which is used to implement Information Hiding.
Encapsulation concept is used to implement the information hiding.
What is Encapsulation?
Encapsulation is the concept of packaging data and functions that work on that data into a single entity, similar to a Java class. This concept is also frequently used to conceal an object's internal representation or state from the outside world. This is known as information hiding.
For example, you might have an attribute that isn't visible from the outside of an object. You include methods that allow you to read or write data. Encapsulation allows you to hide specific data and restrict access to the object's internal state.