Friday, 17 February 2017

Inner & Nested Class : NestedInterface


interface D
{
    interface E{
     public void msg();    }

}
public class NestedInterface implements D.E{

    @Override    public void msg()
    {
        System.out.println( "Hi, This is nested interface." );    }
    public static void main(String[] args)
    {
        NestedInterface nestedInterface = new NestedInterface();        nestedInterface.msg();    }
}

No comments:

Post a Comment