Multiple choice technology programming languages

Select correct answers

  1. Interfaces can implement multiple interfaces

  2. Interfaces can extend any number of other interfaces.

  3. Members of an interface are never static.

  4. class can extend multiple classes

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

Interfaces in Java can extend any number of other interfaces, allowing multiple inheritance of type. This is different from classes which can only extend one class. Interfaces do not 'implement' other interfaces - they extend them. Interface members are implicitly public and can be static (default methods are instance methods). A class can extend only one class due to single inheritance.

AI explanation

In Java the only unambiguously true statement here is 'Interfaces can extend any number of other interfaces' (id 588486): an interface may extend multiple interfaces, e.g. interface C extends A, B {}. The DB-marked option 'Members of an interface are never static' is FALSE — interface fields are implicitly public static final (so they ARE static), and since Java 8 interfaces may also declare static methods. 'Interfaces can implement multiple interfaces' is wrong (interfaces extend, they do not implement). 'A class can extend multiple classes' is wrong (single inheritance of classes). Therefore the correct answer should be 588486, not 588487.