MockReal Logo
Home
BlogPricing
For Employers β†’
  1. Home
  2. Questions
  3. What is the difference between an interface and an abstract class?

What is the difference between an interface and an abstract class?

TechnicalSenior php developerPHP DeveloperSoftware Engineersenior full stack .net and angularSenior Full Stack .NET DeveloperFull Stack DeveloperBackend Developer

An interface defines a contract with no implementation, meaning all methods must be public and abstract, while an abstract class can have both abstract and concrete methods. This allows an abstract class to provide some shared functionality, which can reduce code duplication.

Additionally, a class can implement multiple interfaces but can only inherit from one abstract class, making interfaces more flexible for defining capabilities across different class hierarchies.

More Questions

  • Explain the difference between GET and POST HTTP methods.
  • Authentication vs Authorization?
  • Exception Handling?
  • How do you secure an API endpoint in .NET Core?
  • HTTP Methods?
  • ViewModel in MVC?
  • What are extension methods in C#?
  • What are generics in C#?
  • What are Minimal APIs in ASP.NET Core?
  • What are records in C#, and how do they differ from classes and structs?
MockReal Logo

Spoken interview practice for technical professionals

Product

  • Pricing
  • Questions
  • Positions
  • Resumes
  • For Employers β†’

Company

  • Careers
  • About Us
  • Contact
  • Blog

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

Β© 2025 MockReal. Spoken interview practice. All rights reserved.