The difference between overloading and overwriting.
If a method program with the same method name and return value type as the parent class but different parameter list is queued in the subclass, it will be compiled. At this time, there are two eat methods in the subclass, public void eat(int a){// The two methods that inherit from the parent class are no longer method overrides, but method overloads, so at runtime, which method to call is decided according to the actual parameters.
The result of running the program is
-eat()-
-sleep()-