Encapsulation means hiding something, so you don't know anything about it, not even whether it exists or not.
Abstraction means vague, you may know what it is or expect what it will be and thus behave, but not exactly. And you don't know how it (the object) is implemented in details.
In a more compact context, encapsulation is referring to hiding data members (or attributes) and their types from outsiders, while abstraction means to define the interface or behaviors of an object (the APIs). You know the method signatures (the contracts), but you don't know anything about the implementation.
Copyright © 2026 eLLeNow.com All Rights Reserved.