what are the differences between virtual and abstract methods?

virtual method:

  • virtual methods can have definition
  • they CAN be overriden by the derived types

abstract methods:

  • abstract methods don't have definition
  • they MUST be overriden by the derived types

virtual method:

  • virtual methods can have definition
  • they CAN be overriden by the derived types

abstract methods:

  • abstract methods don’t have definition
  • they MUST be overriden by the derived types

Buy Me A Coffee

Found this article helpful? Please consider supporting!

Ram
Ram

I'm a full-stack developer and a software enthusiast who likes to play around with cloud and tech stack out of curiosity. You can connect with me on Medium, Twitter or LinkedIn.

Leave a Reply

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