JAVA - Abstraction

前端 未结 9 2163
旧巷少年郎
旧巷少年郎 2021-01-15 04:29

I am little confused about abstraction in java.

I have checked many pages stating that abstraction is data hiding(Hiding the implementation).

What I understa

9条回答
  •  旧时难觅i
    2021-01-15 04:53

    Data Hiding is basically hiding details about internal Data Members of a class and only exclusively giving the concerned class access to it.

    Thus it avoids unnecessary penetration from other classes in the application or from any other application, meaning other classes cannot access private member variables directly.

    Thus in this way you abstract internal details of the concerned class.

提交回复
热议问题