Multiple choice technology programming languages

If class A implements an interface does it need to implement all methods of that interface?

  1. Yes, always it should implement

  2. No, Never

  3. No, Not when A is abstract

  4. None of the above

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

Concrete classes implementing an interface must implement all interface methods. However, abstract classes are exempt - they can declare abstract methods instead of implementing them. This allows subclasses to provide the actual implementations. The 'always' and 'never' options are too absolute.