Java, Encapsulation, Programming, Software Development, Technology.
from being accessed by the code outside this shield. So the instance variable (data) of a class is hidden from any other class and can be accessed only through any member function of the class in which it is declared. How to Achieve Encapsulation? It can be achieved through: Declaring the instance