Multiple choice technology programming languages

Select correct answers

  1. The keyword extends is used to specify that an interface inherits from another interface.

  2. The keyword extends is used to specify that a class inherits from an interface.

  3. The keyword implements is used to specify that an interface inherits from another interface.

  4. The keyword implements is used to specify that a class inherits from an interface.

  5. The keyword implements is used to specify that a class inherits from another class.

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

In Java, 'extends' is used for interface inheritance (one interface extending another) and class inheritance (subclass extending superclass). 'implements' is used when a class implements an interface. Options B and E are incorrect because classes don't inherit from interfaces using 'extends', and classes don't inherit from other classes using 'implements'. Option C is wrong because interfaces don't use 'implements'.