Abstraction:
Abstraction lets you focus on what the object does instead of how it does it
That means we use the object without knowing the source code of the class.
Encapsulation:
Encapsulation means hiding the internal details or mechanics of how an object does something.
Encapsulation is wraping data into single unit.
Abstraction lets you focus on what the object does instead of how it does it
That means we use the object without knowing the source code of the class.
Encapsulation:
Encapsulation means hiding the internal details or mechanics of how an object does something.
Encapsulation is wraping data into single unit.