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

When a class implements an interface, it enters a contract to provide concrete implementations for ALL methods declared in that interface. This ensures that any object of the class can be used polymorphically wherever the interface type is expected. Partial implementation is not allowed for non-abstract classes.