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 Java class implements an interface, it enters a contract to provide concrete implementations for ALL methods declared in that interface. This is a fundamental rule of Java interfaces - you cannot pick and choose which methods to implement. Option A incorrectly limits it to only two methods, while option B is also incorrect because the implementation must be complete, not selective.