JAVA - Abstraction

前端 未结 9 2110
旧巷少年郎
旧巷少年郎 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条回答
  •  南笙
    南笙 (楼主)
    2021-01-15 05:16

    Data hiding is when you cannot understand how to work API internally (for example, ArrayList) without reading the documentation. API creators don't provide any access to the array that underlies there.

    You hide API implementation from users that will be used it. They shouldn't worry about how it works internally, they are only interested in the functionality which is provided to them.

    There is a good article about that.

提交回复
热议问题