0
What is abstraction ?
2 Réponses
+ 1
an abstract method is a method which has been declared but has no implementation. for example:
public abstract void myMethod();
is an abstract method.
if you have an abstract method in a class you must declare your class as abstract too.
when you extend the class you must implement the abstract method and give it some functionality.
An interface is like a fully abstract class.
+ 1
Should clarify what you are asking about. There is the 'abstract' keyword, and the process of abstraction, which takes place before implementation (coding).
The keyword is explained by Steven pretty well, so I upvote that -1 to 0 - why downvote O.o
Process of Abstraction:
As you imagine the surroundings, the subject of your program, what you will write, and what's unnecesarry, that is the abstraction itself. Extracting the core and needed information structure from the infinitely detailed information set. For example: creating two program about cars. The result of abstraction may differ, like in case of creating a racing game and a car database handler. In the first, visuals, reflections and speed are important for the gameplay. For the database, factory numbers, service/repair history, owner is needed. Fully different. So, abstraction is the process of making an extraction of the subject, a raw model without uncared details making it able to code and provide a solution for what we truly need.