Home › Interview Questions › What is an interface?

What is an interface?

🟢 Easy Conceptual Fresher level
1Times asked
Oct 2026Last seen
Oct 2026First seen

💡 Model Answer

An interface is a contract that specifies a set of methods that a class must implement, without providing the method bodies. It defines what operations are available but not how they are performed. In languages like Java and C#, interfaces allow multiple inheritance of type, enabling a class to implement several interfaces. For example, in Java you can declare interface Flyable { void fly(); } and a class Bird implements Flyable { public void fly() { ... } }. Interfaces promote loose coupling, abstraction, and polymorphism, making code more modular and easier to maintain.

This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.

🎤 Get questions like this answered in real-time

Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.

Get Assisting AI — Starts at ₹500