Interface are use to create the structure of any project. In
interface all methods are by default Public and not define access
specifies.
In interface we can only declare method & we implement this interface into the class and give definition to all method.
We create interface using “interface” Keyword.
Example
Public interface IClass
{
Int sum (int x, int y)
Int mul (int x, int y)
}
In interface we can only declare method & we implement this interface into the class and give definition to all method.
We create interface using “interface” Keyword.
Example
Public interface IClass
{
Int sum (int x, int y)
Int mul (int x, int y)
}
Comments
Post a Comment