What is the primary advantage of using interfaces over abstract classes in…
2026
What is the primary advantage of using interfaces over abstract classes in Java ?
Answer: B. A class can implement multiple interfaces — In Java, a class can extend only one class, including an abstract class, but it can implement multiple interfaces. This allows a class to follow multiple…
- A.
Interfaces can have constructors
- B.
A class can implement multiple interfaces
- C.
Interfaces can have instance variables
- D.
Interfaces provide faster execution
Attempted by 194 students.
Show answer & explanation
Correct answer: B
In Java, a class can extend only one class, including an abstract class, but it can implement multiple interfaces. This allows a class to follow multiple contracts and supports flexible polymorphism. Interfaces do not have constructors, do not contain ordinary instance variables, and do not provide faster execution by themselves.