Which of the following statement is not true about an interface?
An interface can inherit from another interface.
An interface can inherit from multiple interfaces.
A class can implement multiple interfaces.
It is possible to create a run-time instance of an interface.
It is possible to create a runtime instance of an interface.
Runtime instances are not allowed for interfaces.
Note: runtime instance in the sense creating an object using new keyword.
Ex: the following code will fail assuming interface IEmployee is existing.
IEmployee emp=new IEmployee() ; // this code will give compilation error since interface cannot contain implemented methods or data members ( variables ).
Back To Top