How To Achieve Encapsulation in Java
The most common question in java is how to achieve encapsulation in java, here is the answer: We have to make our data members as private and method can be public. So that no one can directly change the data member.











