类全局变量的初始化,两种方式的区别
public class Test implements ITest {
private List schoolList = new ArrayList();
public Test() {
super();
}
}
和
public class Test implements ITest {
private List schoolList ;
public Test() {
super();
schoolList = new ArrayList<School>();
}
}