Answers for "whats encapsulation"

1

encapsulation

In general, encapsulation is a process of wrapping similar code in one place.

Encapsulation is one of the key features of object-oriented programming. It involves the bundling of data members and functions inside a single class.
Bundling similar data members and functions inside a class together also helps in data hiding.

Note: People often consider encapsulation as data hiding, but that's not entirely true.
Encapsulation refers to the bundling of related fields and methods together. This can be used to achieve data hiding. Encapsulation in itself is not data hiding.
Posted by: Guest on January-16-2022
0

encapsulation

Encapsulation: 
Encapsulation is the mechanism of hiding of data implementation by 
restricting access to public methods. Instance variables are kept 
private and accessor methods are made public to achieve this.
Posted by: Guest on August-09-2021

Browse Popular Code Answers by Language