Interface Basic

interface MyInterface1
{
    public void method1();

}
interface MyInterface2
{
    public void method2();
}
class InterfaceExample implements MyInterface1,MyInterface2
{
    public void method1()
    {
        System.out.println("implementation of method1");
    }
    public void method2()
    {
        System.out.println("implementation of method2");
    }
    public static void main(String arg[])
    {
        MyInterface1 obj1 = new InterfaceExample();
        MyInterface2 obj2 = new InterfaceExample();
        obj1. method1();
        obj2. method2();
    }
}