Parsing Java Abstraction of the Difference Between Classes and
Interfaces
In Java language, abstract scale-up and with support class abstraction definition of
two mechanisms. Because of these two kinds of mechanism of existence, just gives Java
powerful object-oriented skills. Abstract scale-up and with between classes abstraction
definition for support has great similarities, even interchangeable, so many developers into
line non-abstract class definition for abstract scale-up and it is becoming more casual with
choice. In fact, both between still has the very big difference, for their choice even
reflected in problem domain essence of understanding, to design the intentions of the
understanding correctly and reasonable. This paper will for the difference analysis, trying
to give a developer with a choice between them are based.
Understand class abstraction
Abstract class and interface in Java language is used for abstract classes (in this article
non-abstract class not from abstract scale-up translation, it represents an abstract body, and
abstract scale-up for Java language used to define class abstraction in one way, please
readers distinguish) defined, then what are the abstract classes, use abstract classes for us
any good?
In object-oriented concept, we know all objects is through class to describe, but in
turn not such. Not all classes are used to describe object, if a class does not contain enough
information to portray a concrete object, this class is abstract classes. Abstract classes are
often used to characterization of problem field in our analysis, design that the abstract
concepts, is to the series will look different, but essentially the same exact conception of
abstraction. For example: if we carry out a graphical editing software development, will
find problem domain exists round, triangle so some specific concept, they are different, but
they all belong to shape such a concept, shape this concept in problem domain is not exist,
it is an abstract concept. Precisely because the abstract concepts in problem field no
corresponding specific concept, so to characterization abstract concepts non-abstract class
cannot be instantiated.
In an object-oriented field, mainly used for class abstraction types hidden. We can