Tag:abs is nbsp class features Special bsp nal abstract
/*
When the same functionality appears in more than one class, but the functional body is different,
this is possible to pull up. At this point, only the function definition is extracted, not the functional body.
Abstract: Can't read. Features of the
Abstract class:
1, .
2, both abstract methods and abstract classes must be decorated with the abstract keyword.
3, abstract class cannot use new to create an object . Because it doesn't make sense to invoke an abstract method.
4, abstract methods in the abstract class to be used, you must copy all the abstract methods from the child class, to establish a subclass object call.
.
5. Abstract methods in abstract classes do not have a body, and he needs subclasses to do this and interface very similar;
Abstract classes are not much different from generic classes.
How to describe things, how to describe things, but there are some things that are not understood. The
these indeterminate parts, which are also the function of the thing, need to be clearly present. However, the principal cannot be defined. The
is represented by an abstract method. The
Abstract analogy generally has multiple abstract functions. is to define an abstract method in a class. The
abstract class cannot be instantiated.
Special: An abstract method can be undefined in an abstract class, only to not allow the class to establish an object.
Exercise:
The abstract keyword, and which keywords cannot coexist.
Final: The final decorated class cannot have subclasses. The class that is modified by the abstract must be a parent class.
Private: A private abstract method in an abstract class that cannot be replicated without being known to the class.
The abstract method appears to be the need to be replicated.
Static: If static can modify the abstract method, then even the object is saved, and the direct class name is called.
But abstract methods do not make sense.
Java Class (i): abstract class