class ABC { interface XYZ{ void msg(); } } public class NestedInterfaceWithinClass implements ABC.XYZ{ @Override public void msg() { System.out.println( "Hi, This is nested interface within class." ); } public static void main(String[] args) { ABC.XYZ nestedInterface1 = new NestedInterfaceWithinClass(); nestedInterface1.msg(); } }
No comments:
Post a Comment