Object obj = new Object(){ public Object test(){ System.out.println("println"); return null; } }.test();
或者
new Object(){ public void test(){ System.out.println("println"); } }.test();
Object obj = new Object(){ public Object test(){ System.out.println("println"); return null; } }.test();
或者
new Object(){ public void test(){ System.out.println("println"); } }.test();