Java Programming Thoughts 3editor Reading Notes (7 Polymorphism)

xiaoxiao2021-03-06  69

The polymorphism is mainly based on inheritance, and is implemented by "upload" and "download".

Java provides the basis for the rear binding mechanism when the method is called, and the post-binding mechanism is automatically executed.

Use inheritance to describe the various states, with synthetic performance of various states

Next: ClassCastException

note:

1. Don't use the name of the private method of the base class to naming the derived class

2. It is best to define base classes with a Abstract keyword

3. The method of constructing function call is always a method of replying

4. If you write a garbage collection method, the order of cleaning is to pay attention to the order of the system initialization.

转载请注明原文地址:https://www.9cbs.com/read-110382.html

New Post(0)