Run
interface PrepInsta
{
public void method1();
public void method2();
}
class Main implements PrepInsta
{
public void method1()
{
System.out.println("Here is method1 by Interface");
}
public void method2()
{
System.out.println("Here is method2 by Interface");
}
public static void main(String arg[])
{
PrepInsta obj = new Main();
obj.method1();
obj.method2();
}
}
Login/Signup to comment