Advantages and Disadvantages of Encapsulation in Java

The word “Encapsulation” means that closing something like we put the main power of the tablet inside the capsule. It is a mechanism that is done to bind the data and protect it from being used by everyone. After doing encapsulation, the variables and the data of one class cannot be used in another class and this data can be used by the member functions of the same class. Encapsulation can be achieved by adding the private specifier to the

Read more