Encapsulation & Abstraction

  • Note

    1. Encapsulation

    1. Hide internal data

    2. Encapsulation happens during the execution of the code

    3. implementing the code using the access modifiers private, protected, public

    2. Abstraction

    1. Hide internal logic and shows relavent structure /signature

    2. Abstraction haapens during the design phase of the code

    3. implementing the code using abstract class, interface