匿名子类示例
/**
* @auto dh
* @create 2020-04-29-9:25
*/
abstract class Id009{
public Id009(){
}
abstract void test();
}
public class Test009 {
public static void main(String[] args) {
Id009 id=new Id009(){
@Override
void test() {
System.out.println("hello world");
}
};
id.test();
}
}