The override method must meet multiple constraints:
1. the name, parameter signature, and return type of the subclass method must be the same as that of the parent method, parameter signature, and return type.
2. Subclass methods cannot reduce the access permissions of parent methods. However, the access permission can be expanded. For example, from default to public.
3. The subclass method cannot throw more exceptions than the parent method. However, you can throw fewer exceptions than the parent class, or do not throw an exception.
4. Method override only exists between the subclass and parent class. In the same class, it can only be overloaded and cannot be overwritten.
5. Static Methods of the parent class cannot overwrite non-static methods of the quilt class.
6. Static methods cannot be overwritten. However, subclasses can define static methods that are the same as parent classes, but they are only equivalent to a new method defined by subclasses.
7. The private method of the parent class cannot be overwritten by the quilt class.
8. The abstract method of the parent class can be overwritten by the quilt class in two ways: one is to implement the abstract method of the parent class by the subclass, and the other is to re-declare the abstract method of the parent class by the subclass.
9. Non-abstract methods of the parent class can be overwritten as abstract methods.