1

I am no new to programming.Just want to know the actual concept of the Abstraction :

Representing meaningful details, without going much into background details.

For Example, Encapsulation can be explained as the methods and variables wrapped inside a class.

Does Abstraction mean using correct Access specifiers , so that the information can be localized ? Or making data visible to a particular class/method as per the needs? Just a guess.

A small demo Example can be useful.

joey rohan
  • 3,505
  • 5
  • 33
  • 70

5 Answers5

0

Abstraction is specifying the framework and hiding the implementation level information. Concreteness will be built on top of the abstraction. It gives you a blueprint to follow to while implementing the details. Abstraction reduces the complexity by hiding low level details.

Abstraction is a process of hiding the implementation details and showing only the functionality to the user. The focus is on what the object does , rather than how it does.

AllTooSir
  • 48,828
  • 16
  • 130
  • 164
0

In simple words let's say

Abstraction is specifying the framework and hiding the implementation level information. Concreteness will be built on top of the abstraction. It gives you a blueprint to follow to while implementing the details. Abstraction reduces the complexity by hiding low level details.

NOW Abstraction is the concept of describing something in simpler terms.

Ruchira Gayan Ranaweera
  • 34,993
  • 17
  • 75
  • 115
0

It's more like, you have an abstract class car which determines, that a car as an engine, doors, wheels (members) and a car can accelerate, brake, start, stop (methods).

A concret implementation of a car would then be class AudiA3 extends car which then defines that the engine is a V6, that it has 4 doors, 4 wheels and that the accelerate method will do XYZ to the car.

This is abstraction in a nutshell. Check out https://en.wikipedia.org/wiki/Abstraction and further online information about it.

Korashen
  • 2,144
  • 2
  • 18
  • 28
0

Strictly speaking, abstraction in Java (or OOPS) is the ability of the abstract classess or interfaces. Both of them can be used to achieve abstraction in Java. Abstract classes and interfaces are supposed to be implemented by concrete classes. You must extend or implement them according to your logic.

To keep it simple: The idea is to define a contract without regard to what the implementation details are. For eg. If you are building a text extractor, where you want to retrieve title and content, your Interface would just define the contract getTitle() and getContent(). The interface doesn't care how these methods are implemented. A concrete class of the Interface say WebPageExtractorwould handle it differently than a WordDocExtractor.

zEro
  • 1,255
  • 14
  • 24
Ugur Artun
  • 1,744
  • 2
  • 23
  • 41
0

The definition of Abstraction says as :
Abstraction is the process by which essential features of Object Oriented Paradigm are represented without any background details or explanation

Explanation: Something which is not required for programmers nerds or something which can be manipulated for many cases as in Encapsulation. Basically a mask to hide details which are simply not required due the availability of advanced tools in Java Language or in another case, to increase the programming diversity by providing multiple ways to define for the same interface.

Sri Krishna
  • 302
  • 1
  • 2
  • 14