class Outer{ int x=3; public void function() { new AbsDemo() { void show() { System.out.println("x="+x); } interface Test { static class Inner implements Inner { public void method() { System.out.println("method run"); } } } static Inter function() { return new Inner(); } } class InnerClassTest { public static void main(String[] args) { Test.function().method(); } }
添加回答
举报
0/150
提交
取消