Here is a good explanation https://mail.mozilla.org/pipermail/es-discuss/2010-December/012334.html
Basically if you were implementing a java library or API you would aim for strong encapsulation, so that users couldn't access things they aren't supposed to.
Strong encapsulation means that no one can access secret internal variables because you have a proper inheritance heirachy and all that stuff is hidden.
Your example is very weak encapsulation because the variable a
is public. If your class was an API and a
was actually credit_card_details
you would be in big trouble.
For starters you would set those variables as private and use getters and setters to access them.
Overall though, you need something abstracted in order to encapsulate it. The only other thing I have heard encapsulation refer to from an OOP perspective is simply bundling real world objects into classes