public static void Method1(String a)
{
List<DataBean> list = new ArrayList<DataBean>();
list = StaticClass.masterList; // it has prepopulated list item
for (JavaBean bean: list) {
//Some condition and we call bean.setters
}
}
为什么这里StaticClass.masterList
在 for 循环中得到更新,但我在 bean 上调用了更新?