Multiple choice technology programming languages

What is difference between interface and abstract class

  1. An abstract class may only contain on complete method

  2. An interface may contain complete or incomplete method

  3. A class may inherit several interfaces , A class may inherit only one abstract class.

  4. A class implementation an abstract class has to implement all methods of abstract class , but same is not required in case of an interface.

  5. All

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

A key difference between interfaces and abstract classes is that a class can implement multiple interfaces (multiple inheritance) but inherit only one abstract class (single inheritance). This is fundamental to understanding their different purposes in C#.

AI explanation

Java (and similarly-designed OOP languages) allow a class to implement multiple interfaces but extend only a single (abstract or concrete) class, because multiple class inheritance would create ambiguity problems that multiple interface implementation avoids. This single-vs-multiple inheritance distinction is the core structural difference tested here, separate from any details about method completeness.