JAVASE knowledge summary (c)

Chapter XVI: abstract classes and interfaces
First, the abstract methods: in front of the method plus the abstract (in order to solve, subclass must override this method, when not defined method body).
Features: 1, no method abstract method thereof.
2, abstract methods must be placed in the abstract class (abstract class preceded) or interface.
3, an abstract method is not private, not modified with the final, static can not be used simultaneously. Example: abstract Double getArea (); Second, the abstract class: Note points: 1, can not create abstract class object directly. 2, can have abstract methods abstract class which can also have non-abstract method (general method: Let the subclass call). 3, to cover the subclass does not abstract methods, has become abstract class handle. 4, named: like before plus Abstract naming names. 5, there must be a subclass of abstract class makes sense. Third, the difference between abstract classes and regular classes? 1, some general categories (fields, methods, constructors) are abstract class 2, can not create object abstract class, an abstract class can contain abstract methods, it may also comprise an abstract method. Fourth, the interface 1, what is the interface? 2, the definition of the interface 3, the interface is a special abstract class 4, the interface among the attention point 5, implementation of the interface 6, the interface with the abstract class distinction 7, oriented programming interface





























Guess you like

Origin www.cnblogs.com/javastudydoing/p/11546241.html