+ 1
What is the difference between c++ abstraction and Java abstract class?
I'm so confused about it.as I read in c++ abstraction is creating multiple objects from a class like a 'Bank', and it's something else in Java also it recommend to use abstract before class.. please make this clear for me.
1 Answer
0
By definition and application they are the same, abstraction is an inheritance property where the programmer creates a class (abstract) with undefined (without a body or code) method signature, and then which ever class that extends (inherits directly) from the abstract class must implement (provide code or logic) those method signatures on the abstract class in the concrete class extended. This applies to both C++'s abstraction data and Java's abstract classes.
If your confusion is on which is more convenient, there's no undisputed answer, but my suggestion is to go with Java for general purposes due to it's advantages or go with C++ if you need to managed memory efficiency.