/*
按照要求,补齐代码
interface Inter{
void sho();
}

class Outer{
//补齐代码
}

class OuterDemo{
public static void main(String[] args){
Outer.method().show();
}
}
要求在控制台输出"HelloWorld"
*/
package cn.test;

interface Inter{
void show();
//public abstract void show();
}

class Outer{
public static Inter method(){
//子类对象 -- 子类匿名对象
return new Inter(){
public void show(){
System.out.println("HelloWorld");
}
};
}
}

class OuterDemo{
public static void main(String[] args){
Outer.method().show();
/*
a:Outer.method()可以看method()应该是Outer()中的一个静态方法?
b:Outer.method().show()可以看method()方法的返回值是一个对象。
又由于接口Inter中有一个show()方法,所以我认为method()方法的返回值类型是一个接口。
*/
}
}