Adapter mode
------------------------------------
1, if the interface in a number of methods, and in the use of the interface is only concerned about one or several of the methods, if the conventional way, you need to implement each method, you can create a class to implement the interface, do not care about the method of empty implementation, the method of care remains unchanged, the definition of the new class inherits the abstract class, This is known as the adapter pattern, which is commonly used in the handling of button click events in UI design.
Polymorphic
--------------------------------------
1. Use the object defined by the parent class to refer to the child class. The interface is also polymorphic
2. Prerequisites:
* need to inherit or implement
* Actions that need to be overwritten.
The most important attribute in the 3.java is that all the data exists in the attribute, and the method is just a stack, and it pops up after execution.
Properties cannot be overridden and methods can be overwritten.
4. The number of stacks depends on the number of threads (one thread corresponds to one stack), and the entire Java program has only one heap area.
5. Characteristics of polymorphism
member functions
Compile-time
To view the class to which the reference variable belongs
Run-time
Member variables
See only the class to which the reference variable belongs
Inner class
-------------------------------------------------------
Features: Inner classes can access members of external classes, including private members
Big Data-java Foundation -6day