abstraction - The process of abstraction in Java is used to hide certain details and only show the essential features of the object.
Data hiding is just a means by which one hides away data from the external world... example, the lungs of a person is not seen by anyone, but used for the internal working of the human being!
Data Encapusation allows to package all the contents of the object. They may or may not be public to the external world. Example, the skin is part of the human, and so is the lung. Together all the components of the human make up one whole being!
Data Abstraction is the means by which one displays only what is required to the user. Sample - the mood of a person to a girl, a snake, a cat, a father, or a boss. Though they are all emotions, they differ based on the stimuli, and hence a portion of the whole is displayed to the person who requests it.
Showing posts with label oops. Show all posts
Showing posts with label oops. Show all posts
Thursday, June 12, 2008
About Interface in Java
n the Java programming language, an interface is a reference type, similar to a class, that can contain only constants, method signatures, and nested types. There are no method bodies. interfaces cannot be instantiated—they can only be implemented by classes or extended by other interfaces.
An interface can contain constant declarations in addition to method declarations. All constant values defined in an interface are implicitly public, static, and final.
An interface can contain constant declarations in addition to method declarations. All constant values defined in an interface are implicitly public, static, and final.
Subscribe to:
Posts (Atom)