How to change the class of son's function which inherited from father class?
时间: 2024-05-29 18:08:16 浏览: 79
Java_inherit_abstract_function_interfaces_classic__Inherited
To change the class of a son's function that is inherited from a father class, you can create a new class that inherits from the father class and override the son's function in the new class with the desired behavior. Alternatively, you can also directly modify the son's function in the son class to change its behavior, but this may not be recommended if you want to maintain the integrity of the original father class.
阅读全文