不全代码 interface Inter(){void show();} class Outer{补全代码} class OuterDemo{ public static void main(String[] args){ Outer.method().show(); } } 打印台:Hello World class Outer{ public static Inter method(){ return new Inter(){public void show(){System,out,pri…
内部类 // 外部类 class Demo{ private int num = 3; // 定义内部类 class Int{ void show(){ System.out.println("num="+num); } } void method(){ Int int = new Int(); int.show(); } } class Inner{ public static void main(Stirng[] args){ Demo demo = new Demo(); dem…