What is the difference between method overriding & method hiding?

Key points:

  • In Method Overriding, we know what method will be called at run-time. But in Method Hiding, we know what method will be called during compile time.
  • You can think Method Hiding as you are stopping the method from being polymorphic. Hence there won't be any run-time polymorphism.
This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. For more information - please visit our private policy.