Question

In object-oriented programming, when defining an interface method, which of the following statements is true regarding method parameters?

A Interface methods can have parameters, but they cannot have return types.
B Interface methods must have parameters defined with default values.
C Interface methods can have parameters, but they must be implemented by classes that provide specific implementations.
D Interface methods cannot accept any parameters and must be parameterless.
E Interface methods can have parameters with variable length, but they cannot use standard data types.
Practice Next

Hey! Ask a query