Multiple choice technology programming languages

If a class declares that it implements an interface(class A implements B), must class A implement the methods of interface B?

  1. Under all circumstances

  2. Unless A is abstract

  3. A class that implements an interface cannot be abstract

  4. none of the above

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

A concrete class implementing an interface must provide implementations for all interface methods. However, if the implementing class is abstract, it can defer implementation to its subclasses. Option A is too absolute, C is false (abstract classes can implement interfaces), and D is incorrect because B is valid.