Multiple choice technology programming languages

When a program class implements an interface, it must provide behavior for...

  1. Two methods defined in that interface.

  2. All methods defined in that interface.

  3. Only certain methods in an interface.

  4. Any methods in a class.

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

Implementing an interface establishes a contract requiring the implementing class to provide concrete behavior for all methods defined within that interface. Providing behavior for only a subset of methods or arbitrary class methods violates this contract and prevents compilation unless the implementing class is abstract.