Multiple choice technology programming languages

Interface

  1. has no implementation

  2. only has definitions

  3. must be implemented by class or struct

  4. All the above

  5. 1 & 2

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

In object-oriented programming (particularly classic Java and C#), an interface defines a contract containing only signatures or definitions without implementation. Classes or structs implementing the interface must provide the concrete code for these members. Thus, all individual options are correct, making 'All the above' the right choice.