This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes how to achieve abstraction ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to achieve abstraction ?" Watch "how to achieve abstraction ?" New topic
Author

how to achieve abstraction ?

naved momin
Ranch Hand

Joined: Jul 03, 2011
Posts: 688

i know we can achieve inheritence with the help of the keyword
i know we can achieve encapsulation by keeping my instance variable private and providing setters and getters method public
i know we can see polymorphism by creating the reference of super class and object of base class like and i also know run and compile time polymorphism
but my question is how to achieve abstraction ?
i think getter methods provide abstraction but i m not clear with that can any one explain me this ?

The Only way to learn is ...........do!
Visit my blog http://inaved-momin.blogspot.com/
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38075
    
  22
Abstraction means that a class represents something in real life. Whichever data you want about the real-life object, you create a class which has the same data, and the class acts as an abstraction.

If a person has name and age, then a Person class with name and age fields acts as an abstraction of a Person. If you want to do anything with those data, the class (or more precisely the instance) does that too.
 
 
subject: how to achieve abstraction ?
 
Similar Threads
OOPS Concepts - Redefined(Confirmation required)
Articles on OOP
oops concept clarification
Can any body give me the example for abstraction.
overriding static methods in subclass