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. Only certain methods in an interface.

  3. All methods defined in that interface.

  4. Any methods in a class.

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

When a class implements an interface in Java, it must provide concrete implementations for ALL methods declared in that interface (unless the class is declared abstract). This is a contract - the interface promises certain behaviors, and the implementing class must deliver them. Option A is incorrect because it's not limited to just two methods - it's all methods.