Which of the following statements is correct?

A) Interfaces are classes.

B) A class can implement more than one interface type.

C) All fields in an interface are private.

D) A class can implement only one interface type.

Respuesta :

Answer:

B) A class can implement more than one interface type.

Explanation:

A Java class can implement multiple interfaces.

For example:

class Test implements java.io.Serializable,java.lang.Runnable{

/* The class should contain method signatures for all the methods defined in all the interfaces it implements */

}

Note that a java class can inherit from only one superclass but this restriction is not applicable while implementing multiple interfaces.

ACCESS MORE