class Test2_NoNameInnerClass {
public static void main(String[] args) {
Outer.method().show();
}
}
interface Inter {
void show();
}
class Outer {
public static Inter method(){
return new Inter(){
public void show(){
System.out.println("helloworld");
}
};
}
}
//public static Inter method(){ 里的Inter怎么理解?
|
|