It's not the visibility of the show() method that matters. The point is the a member variable. That's visible to other classes (in the same package). To be encapsulated, it should only be possible to access member variables via a method.
It's debatable whether just providing public (or package) accessors (getA and setA) to a private member is considered more "encapsulated" than just providing a public (or package) attribute.
It becomes really encapsulated when you provide a getter for an attribute and that value of the attribute is calculated by a method, and not provided from an outside call, so that no one messes with it.
Now the class has complete control over its private member "a".
There is nothing more "completely encapsulated" about a variable that is computed instead of stored in the same format as being returned. The class has complete control over 'a' in relation to other classes, because all they can do are the operations provided by the class for a -- whether it is computed, stored, generated at random, or whatever is up to the class providing those methods. That is complete, 100% encapsulation in relation to other classes. In circumstances where they cannot see the code that returns a, they would not know nor should they care how the value is determined, or what else is done when it is determined, etc.
The thing that makes this "more encapsulated" than a public or package protected (or protected) member is that, once you reveal that internal representation of that data, and publicize it as part of the way another class can interact with your class, then changing it has the potential for changing any class that uses this class. Therefore the using class and the used class are tied together by this implementation, and changing it could require changing all.
In addition, if you reveal a variable's type and make it accessible directly, you lose the opportunity for the getter / setter methods to do something in addition -- update counters, update collections, notify listeners -- that they may not do when the class is written, but someone may find a use for later on.