← Antra Interview Insights

Antra·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Interviewed for a Software Engineer role at Antra and got hit with a classic OOP theory question. Not a bad experience, just one of those technical screens where they want to see if you actually understand the fundamentals versus just having memorized buzzwords.

Questions Asked (1)

Q1

What are the differences between an interface and an abstract class, and when would you choose one over the other?

Technical Trade-offsSystem Design
Author's notes

I started with the easy stuff, what each can hold.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining both concepts clearly, then compare them across key dimensions like inheritance, state, and method implementation. Finally, explain when to use each based on design goals such as code reuse, contract definition, and multiple inheritance.

Pro tip: Mention that modern languages like Java 8+ and C# have blurred the lines with default methods, but the core distinction remains: interfaces define capabilities, abstract classes define identity. Also, relate your choice to real-world scenarios like API design or framework development.

1. Define interface and abstract class

Briefly explain that an interface is a contract with no state (traditionally) and an abstract class is a partial implementation that can have state and behavior.

2. Compare key differences

Highlight differences in inheritance (multiple vs single), state (fields), constructors, and method access modifiers.

3. Discuss language-specific nuances

Mention that some languages (e.g., Java 8+, C#) allow default methods in interfaces, but abstract classes still support state and constructors.

4. Explain when to choose which

Use interfaces to define a role or capability that multiple unrelated classes can implement; use abstract classes to share code among closely related classes.

5. Provide a concrete example

Give a real-world example, such as using an interface for a 'Comparable' contract and an abstract class for a 'Vehicle' base class.

Key Points to Mention

  • Interfaces support multiple inheritance, abstract classes do not (in languages like Java/C#).
  • Abstract classes can have state (fields) and constructors, interfaces cannot (traditionally).
  • Interfaces define a contract (what), abstract classes define a partial implementation (how).
  • Use interfaces for decoupling and defining roles; use abstract classes for code reuse and shared behavior.
  • Modern languages allow default methods in interfaces, but abstract classes still offer more structure.
  • Consider design principles like 'program to an interface' and 'favor composition over inheritance'.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.