05 October 2010
0 What is Abstraction in Java OOP?
The one who is driving a car need not know how the car engine works.
Consider the case of Stack, programmer need to know just how to invoke the push method and pop method to make the Stack object work. But internally, Stack can be implemented using an array or a linked list, programmer need not know this to use the Stack object.
Thus Abstraction is the process of exposing only the relevant details and ignoring (hiding) the irrelevant details (Don't get confused with "datahiding" of the "Encapsulation").
Abstraction simplifes the understanding and using of any complex system.
Another example, user does not have to understand the internal implementation of a software object to use it.
Consider the case of Stack, programmer need to know just how to invoke the push method and pop method to make the Stack object work. But internally, Stack can be implemented using an array or a linked list, programmer need not know this to use the Stack object.
Thus Abstraction is the process of exposing only the relevant details and ignoring (hiding) the irrelevant details (Don't get confused with "datahiding" of the "Encapsulation").
Abstraction simplifes the understanding and using of any complex system.
Another example, user does not have to understand the internal implementation of a software object to use it.
Subscribe to:
Post Comments (Atom)
0 comments:
Please give your valuable comments.