public class P {
public P getSelf() {
return this;
}
}
@Test
public void test4() {
P p = new P() {
{
System.out.println(11);
System.out.println(getSelf());
}
};
}
List<String> list = new ArrayList<String>() {
{
add("a");
add("b");
}
};
你看下这个list的,调用list内的方法
构造代码块