program of interface
PROGRAM-
interface A
{
void
m1();
}
class B implements A
{
public void m1()
{
System.out.println("B
class implementation");
}
}
class InterDemo
{
public
static void main(String args[ ])
{
B
ob=new B();
ob.m1();
}
}
Comments
Post a Comment