Can a static method in a parent class be overridden in a child class?

  • Yes
  • No
  • Depends on the method implementation
  • Only if explicitly declared as override
Yes, a static method in a parent class can be overridden in a child class. However, it's important to note that static methods are associated with the class itself rather than instances, and the child class can provide its own implementation of the static method, effectively overriding the one in the parent class.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *