First, exhausting and abstract methods
1. Abstract methods in abstract classes must be implemented by the quilt class unless the subclass is also abstract.
2. Abstract class cannot be instantiated but abstract class references can aspire to a concrete implementation of his sub-class object
3, the abstract class has the construction method can not be called by the way of the instantiation, but may be called when the subclass object is created, so the abstract tired construction method is to let the child class call
4. Abstract methods in abstract classes cannot be called because an object cannot have an abstract class (abstract classes cannot be instantiated)
5, abstract class can have ordinary members (variable method) static method But the subclass of the same name of the static method does not constitute a rewrite to pay (override implementation)
Second, the interface
Public interface Interface Name {
Static constants (public static final)
Abstract method (Pubilc abstraction)
}
An interface is a class row that is more abstract than an abstract class
Interface is the constraint to its implementation class, which constrains the design of the implementation class to provide a specification
If a subclass inherits an abstract class colleague implements an interface that can only use subclass references to simultaneously invoke the implementation of the parent class interface
A class can implement multiple interfaces multiple interfaces can use a comma interval
Jen abstract class and abstract method of Java basic notes for babies