Type Here to Get Search Results !

What is the purpose of the interface keyword in a programming language?

0

 What is the purpose of the interface keyword in a programming language?

A) To define a concrete class.
B) To specify a set of methods that implementing classes must provide.
C) To create an abstract class.
D) To allow for multiple inheritance.

Answer: B) To specify a set of methods that implementing classes must provide.

Explanation: The interface keyword is used to define an interface, which is a contract that specifies a set of methods that implementing classes must provide. It does not contain any implementation details, allowing different classes to provide their own implementations of the methods defined in the interface.

Post a Comment

0 Comments