Multiple choice technology web technology

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

  1. Two methods defined in that interface

  2. Only certain methods in an interface

  3. Any methods in a class

  4. All methods defined in that interface

Reveal answer Fill a bubble to check yourself
D 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 is a fundamental Java principle - interfaces define what a class MUST do, and the implementing class provides the specific behavior for every method.